I am very new to Navision, Is it possible to create buttons at runtime from a table? If not, I am been trying to change the caption of the button on From_Initiate and I get an error message with the ID of the button I am trying to play with… How could I change the caption of that button before the User sees it. Thanks in advance, John
Hi John, I’m sorry but neither request is possible. As an alternative, you can create all the CommandButtons you need and place them one over the other on the Form, so they completely overlap each other. Then you can decide in OnOpenForm trigger, which CommandButton to show. Additional info: you can not refer to Controls on a Form in the OnInit trigger. The Form is still not initialized and it doesn’t know the Controls yet.
You can use a Text Box over the button to give the appearance of a changing caption. Look at how the Comments button works (Sales Order for example)…They use a Picture box, but a Text Box would work the same. Changing Menu Options at run-time is a different story.
Hi, U can not change the caption, but u can show/hide controles at run-time. Cheers