I am trying to find examples of how to access Navision data and variables from an RTC add-in. So far, all I am finding is information about how add-in controls use SourceExpr to access the single data item they are attached to. How do you access anything else?
I am trying to conditionally control the background color of a control
What would Elvis do?
0
Comments
In NAV2009 you pass data generaly in XML Format through a BigText (at least i did it like this for all my addins).
Then i parse them in the addin and use the data.
Idem, on msdn web site, there is a good explanation about Addin. You can pass a BigText or XmlFile Path ...your addin could open with Dotnet method, it's very easy. Moreover, you can found an Addin Template for Visual Studio with a tutorial.
In the addin code the CreateControl function does not seem to get the data (text) passed to it so I can't do it there.
I actually got something working - sort of. I used WinFormsControlAddInBase to build it and I pass the data in a Nav text variable that is used for SourceExpr. The Nav text variable contains several data fields and using that I can cause the background of the control to change based on the data. It works fine except when it comes to writing data back. Since the SourceExpr is no longer a single field from the record, how do I accomplish writing anything back?
This calls the nav trigger OnControlAddin() where you receive the same parameters (index, data)
thanks for the responses and help