Hide menu items in a form

People, How can i make at the hand of a condition that under the button posting only two of the four options are visible? IF Combine shipments = TRUE THEN … Greetz [8D]

Unfortunately you can’t just set a Visible property dynamically which is I guess what you would like. There are two common solutions that I use. a/ Create two seperate identical buttons, and use code to Show/Dide the appropriate button. To do this though you do need to have access to the developer tools. If you only have Form and Report designer, then you can do it this way… Create a new button, and add code to create a string menu, and then build the text up depending on yur conditions. (Or just have different Text Constants selected as appropriate). Then just call the requred funcion from a Case statement. I prefer this methid, since it then allows the end user to make changes them selves without needing the Developers. One place I do this a lot is in Printing Orders, so that differnt conditions offers a different set of orders to print, vvery handy in Manufacturing.

thanks for answering, but how can i make the button visible and Not visible?

CurrForm.MyButtonA.VISIBLE(ShowButtonA); CurrForm.MyButtonB.VISIBLE(NOT ShowButtonA); Just give the Buttons the names MyButtonA and MyButtonB

sorry for questioning again, but where stands ShowButtonA for and the best is to put this condition in OnOpenForm()?

quote:

sorry for questioning again, but where stands ShowButtonA for and the best is to put this condition in OnOpenForm()?
Originally posted by mrootjes - 2005 Jun 08 : 07:40:57

Obviously since I can’t see you code, I have absolutely no idea, but a good starting place might be in: OnAfterGetRecord or OnAfterGetCurrentRecord

thanks, another great feature has been made in our Navision database![:D][8D]

Good Stuff.[:D]