Extra Contextual Data from Add-in

BrentNewbury
Member Posts: 11
Hi everyone,
I'm trying to create a .NET add-in control to Dynamics NAV 2009 SP1. This add-in will contain controls (i.e. buttons) which launch other processes or make calls to web-services, passing contextual data about the form the control is placed on. For example, if the add-in control is on a Customer Card page, when a button is clicked it will retrieve extra data about the current customer and pass it to a web-service. Another example would be, retrieving ledger data for a selected ledger entry, if my add-in control is placed on the Customer Ledger Entries page. This is just an example, but what I'm asking is (and this might be a basic question); how do I get hold of, or query, that data?
From my current add-in, all I can do is pass a single value in to the add-in, e.g. the customer "No." (by setting the SourceExpr property on the add-in control in the Object Designer).
Other API's I've come across have a large business object model and pass this information to an add-in. The API for Dynamics NAV doesn't do this, or doesn't do this in the same way.
My second question is, is there any way to install an add-in automatically and have the relevant pages, e.g. Customer Card, Vendor Card, Customer Ledger Entries, etc., altered to include my add-in, rather than having someone manually place the add-in on the page using the Object Designer? This is purely to achieve a simple install from a client perspective. What I've found so far is that I can place an assembly in the Add-ins folder, add a record to the Client Add-in table. But so far, the objects/arrangement in the Object Designer have alluded me. I think it may be stored in the BLOB Reference column of the Object table, but stored in an encrypted form. No encoding I've tried will display an image (which is the column type) or coherent plain text. This is just a huntch, as I saw no other file access from the Role Tailored Client in the Sysinternals Process Monitor when saving my customised Customer Card page.
Please feel free to tell me if you believe I'm doing anything wrong, or going about this the wrong way. Also be aware that I don't know C/AL, but accept I may need to learn it.
Thank you for any input you can provide.
Regards,
Brent Newbury
I'm trying to create a .NET add-in control to Dynamics NAV 2009 SP1. This add-in will contain controls (i.e. buttons) which launch other processes or make calls to web-services, passing contextual data about the form the control is placed on. For example, if the add-in control is on a Customer Card page, when a button is clicked it will retrieve extra data about the current customer and pass it to a web-service. Another example would be, retrieving ledger data for a selected ledger entry, if my add-in control is placed on the Customer Ledger Entries page. This is just an example, but what I'm asking is (and this might be a basic question); how do I get hold of, or query, that data?
From my current add-in, all I can do is pass a single value in to the add-in, e.g. the customer "No." (by setting the SourceExpr property on the add-in control in the Object Designer).
Other API's I've come across have a large business object model and pass this information to an add-in. The API for Dynamics NAV doesn't do this, or doesn't do this in the same way.
My second question is, is there any way to install an add-in automatically and have the relevant pages, e.g. Customer Card, Vendor Card, Customer Ledger Entries, etc., altered to include my add-in, rather than having someone manually place the add-in on the page using the Object Designer? This is purely to achieve a simple install from a client perspective. What I've found so far is that I can place an assembly in the Add-ins folder, add a record to the Client Add-in table. But so far, the objects/arrangement in the Object Designer have alluded me. I think it may be stored in the BLOB Reference column of the Object table, but stored in an encrypted form. No encoding I've tried will display an image (which is the column type) or coherent plain text. This is just a huntch, as I saw no other file access from the Role Tailored Client in the Sysinternals Process Monitor when saving my customised Customer Card page.
Please feel free to tell me if you believe I'm doing anything wrong, or going about this the wrong way. Also be aware that I don't know C/AL, but accept I may need to learn it.
Thank you for any input you can provide.
Regards,
Brent Newbury
0
Comments
-
1) You cannot add the addin to the pages automatically, you can only export the objects into text, made the changes auomatically (somehow), import back, compile.
2) You need to pass all info through the "one" value. But this value could be XML, thus keeping "many" values inside.
3) For me what you described smells by "big brother" - a way to take the data from NAV and send them somewhere else... could be dangerous... :-k0 -
On points 1 and 2; what mechanism or API can I employ to achieve this?0
-
You cannot do it from the addin. It must be pushed into the addin, not pulled from inside.0
-
How would data be pushing into the add-in? Would it involve a Codeunit or XMLport? I apologise for what is probably a basic question.0
-
The way is just on the developer. I recommend to study the TimeLine demo or the TreeView demo page how the data are pushed into the addins. Or you can look at my UniWPF addin demo.0
-
Thanks for advice kine, it's very much appreciated.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