Hi!
I'm trying to create a resuable ControlAddIn button on pages. A button which I can reuse and set name and size dynamicaly
I managed to create it and with proper methods to do this. However, the problem I'm struggling with is to set the properties of the add-in at the startup of the page.
According to this
http://msdn.microsoft.com/en-us/library/hh168173(v=nav.70).aspx I can't set this properties in the trigger OnInit, OnOpenPage and OnNewRecord because the control is not instantiated which is was of my points with this reusable add-in.
I have also tried the trigger OnAfterGetRecord but the same result.
One thought was to create static properties and methods that could set these values before instansiation but that failed since static members can't be shown in the symbol menu(?).
A workaround is to hide the Controls on the page and then show the with an action that changes the properties at the same time.
Does anyone have a better suggestion of a workaround or solution?
Answers
I realised that I could do a callback to NAV from the CreateControl method and in NAV set the properties.
Visual Studio Code
Code in Control trigger in NAV:
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com
Think of it as a button control you can place on a page.
Also, instead of creating a button addin to every button you need I wanted to create a general one which you can reuse.
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com