Re: Object name to ID
Dunno if this'll help - but this is what I do in the menu item itself. After the user logs in (so as to get rights), I do "Broadcast Recursive Send DoSetSecurityLevel'
Code:
Object mniEDIMarkedToShip is a cCJMenuItem
Set psCaption to "EDI Marked to Ship"
Set psTooltip to "EDI Orders Marked to Ship"
Procedure OnExecute Variant vCommandBarControl
Handle hoClient
Get Client_Id to hoClient
Send Activate_EDIMarkedToShipAll of hoClient
End_Procedure
Property Boolean pbShowit
Function IsVisible Returns Boolean
Function_Return (pbShowit(Self))
End_Function
Procedure DoMenuSecurity
Integer iRightsLevel
Get CheckRightsForView "EDIMarkedToShipAll" to iRightsLevel
Set pbShowit to (iRightsLevel>0)
End_Procedure
End_Object
Garret
Time for an oldie but goodie:
"If it ain't broke, you're not trying." - Red Green