Menu button

How to make a ‘menu button’ invisible in a form.Please tell me the source code

Do you mean the button itself? That’s NAV 101, lookup the VISIBLE property.

If you mean one of the options inside of the menu button, then that is not possible. You should put code behind its OnPush trigger to thrown an error if the person doesn’t have access.

Do you mean the button itself? if yes just go to the properties of that menu button and select the VISIBLE property to NO.

If you mean one of the options inside of the menu button, then just select the Menu Button and go to Menu Items of that Menu button by selecting the File → Menu Items, and Uncheck (Remove Tick mark) the menu item that u want it to UNVisible and save the form.

Regards

Ravi

Do you mean the button itself? if Yes just go to the properties of that menu button and select VISIBLE property to NO.

If you mean one of the options inside the menu button, then go to the menu items of that menu button by just clicking the View

→ Menu items and uncheck (Remove the tick mark) the menu item that u want it to unvisible.

Regards

Ravi

Basically, I wanted to hide the menu button for specific users. To do that, I had to insert a boolean field in the user setup table. When an user logs in, it gets the user id. If the boolean field is true then the menu button is shown, else it’s hidden. To do that I had to write few lines of simple code.

You have to assign a name to your menu-button via button’s property; default “name” is something like “”. Then in your OnOpenForm-trigger write CurrForm.AssignedName.VISIBLE(ConditionForVisible);.

Hi bijoy

exactly wat anfinnur said, but u need to put a condition for that to which users u want to give the access to c the menu button

for ex :

In your OnOpenForm-trigger write

if USERID = 000120 then

CurrForm.AssignedName.VISIBLE(ConditionForVisible);.

CurrForm..VISIBLE := False;