Access Nav data from RTC add-in

Steve_Contris
Member Posts: 114
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
I am trying to conditionally control the background color of a control
What would Elvis do?
0
Comments
-
You can't acces anything else in NAV2009, in NAV2013 you will be able to define methods that you can call from within NAV, then you can pass your NAV variables to the addin.
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.0 -
deV.ch wrote:You can't acces anything else in NAV2009, in NAV2013 you will be able to define methods that you can call from within NAV, then you can pass your NAV variables to the addin.
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.Navision Technical Consultant & .Net Developer0 -
I am wanting to change the background of a control conditionally. For example, if the Sell-to city is not the same as the Ship-to City, I want to make the background of the control for the Sell-to City a special color. How can I pass both those fields in to the addin control? Also, what particular event should I override in the addin to perform the background change? I tried ControlAdded but that didnt seem to get called. I tried TextChanged but that gets called too many times as the page is drawn.
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.What would Elvis do?0 -
I hunted around in msdn for examples but did not have much luck can someone give me some links?
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?What would Elvis do?0 -
Once I had the declaration of my class object correct, I was able to use the RaisControAddInEvent to get the data written. I needed to use StringControlAddInBase to see that.
thanks for the responses and helpWhat would Elvis do?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions