Deactivating a menu option

sabzam
sabzam Member Posts: 1,149
Hi Everybody,

I have created a menu button in the Resource card and has got a number of items. I need to activate and de-activate certain items according to the type field. What coding should i use, can I use the ACTIVATE in a some way or anotehr?

Comments

  • Maximus
    Maximus Member Posts: 105
    Hi you have to click on this Menubutton with your right mouse button, go to "menuitems" and then disable or enable the MenuItems (boolean in front of line)
  • DaveT
    DaveT Member Posts: 1,039
    Hi Sabzam,

    I don't think that you can set this using C/AL code. A possible solution is to have two buttons with the menu item assigned and display (using the visible property) depending on the type you need.

    Hope this helps.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • sabzam
    sabzam Member Posts: 1,149
    Actually, I need something more dynamic
  • DaveT
    DaveT Member Posts: 1,039
    Hi Sabzam,

    Another suggestion is to develop a tiny form which you pop-up ( using runmodal) and code the display of options and return the selection to the calling form
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • kine
    kine Member Posts: 12,562
    There is no way how to make the menu button dynamic. You can only take the NAV way and show error when you select item which is not allowed for selected record... :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.