How can i disable a button...when user do a certain action

gison
gison Member Posts: 128
Dear all,
I'm gonna to disable the button if user do a certain action.
but i can not find this button object beneath CurrForm....

Is it possible to control it....on the way i said... :?
thanks for all ideas.

Comments

  • NaviDev
    NaviDev Member Posts: 365
    Give name to the button to be able to access its properties.
    Navision noob....
  • sendoh
    sendoh Member Posts: 207
    currform.mybutton.enabled = false;
    Sendoh
    be smart before being a clever.
  • gison
    gison Member Posts: 128
    i appreciate you guys.
    :D
  • gison
    gison Member Posts: 128
    other problem is.... is it possible to disable certain menuitem in a menu button. :-s
    cause i tried the same way to modify the name of menuitem but still can not find it in C/AL Symbol Menu.
  • kine
    kine Member Posts: 12,562
    No, it cannot be done. There were many questions around that on this forum. You just can define more MenuButtons with different menu items and change their visibility on certain condition...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gison
    gison Member Posts: 128
    hello kine,
    I see....it's too much effort...the codes of every manuitem in the button should be duplicated.....
    probably just show a error would be easy... :?

    thanks
  • kine
    kine Member Posts: 12,562
    Yes, it is easier... and more "NAV way" 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.