Control addin - partial update
Wildcard
Member Posts: 26
Hello,
I have an addin with to have an interactive image on a page. It worked well and I wanted to change one of the trigger.
Like adding a parameter on a event ... The parameter is not shown on the trigger on the page.
After I just changed the name without the parameter (like the version that was ok before). The new name does not appear but the change in the function is working. The publication of the events does not work.
I remove everything .zip, code in nav, dll and in the control addin. Redo everything but nothing change. I'm I missing something ?
Thanks
Wildcard
I have an addin with to have an interactive image on a page. It worked well and I wanted to change one of the trigger.
Like adding a parameter on a event ... The parameter is not shown on the trigger on the page.
After I just changed the name without the parameter (like the version that was ok before). The new name does not appear but the change in the function is working. The publication of the events does not work.
I remove everything .zip, code in nav, dll and in the control addin. Redo everything but nothing change. I'm I missing something ?
Thanks
Wildcard
0
Answers
-
If I understand you correctly, you created a control add-in and subsequently made a change to the control's code but it doesn't appear to be updating in the C/AL codes, however, the changes do appear in the function of the control that you modified, correct?0
-
the triggers in the page are not changed (I deleted the control addin, made it completely new somewhere in another page) but the changes I do in the control addin are visible
For example I just changed the event name in the control addin (no change in NAV), i add an alert('test') and I receive the alert
Everything is updated, execpt the event ...0 -
This is by design. The way to refresh the codes in NAV, which is kind of bad, but you have to remove and add the control back in. The easiest way to do that is to go to the Properties window, look for the ControlAddIn property, cut out out the value, hit enter, and NAV will ask you to confirm. Choose Yes and this will wipe out all existing codes that are generated by this add-in. Go back and paste the value back in. When you go back into the C/AL Editor, you'll see the new functions or parameters that you added to your add-in.
The bad thing about this is that all your codes, the ones that you've written in NAV, in the add-in's code blocks, will be lost. To circumvent that, create a function, which can even be the same name, then reference that function from the control add-in's code. For example, I have an add-in that exposes a method called DownloadLink. This shows up as ControlName::Method. Instead of adding NAV codes to this method, I create a NAV method with the same parameters and pass this parameter over. This way, when I have to refresh, the only thing I need to do is add the DownLoad(...); line back in.
NAVCoreLiveLinks::DownloadLink(url : Text;saveAsFile : Text)
DownloadLink(url, saveAsFile);0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 327 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