Problem C/AL not updated

NavDave
Member Posts: 13
Hi everyone,
I don't know if this is a common Nav Bug but sometimes when I modifiy a C/AL CodeUnit, Save+Compile and then run,
the CodeUnit doesn't launch with the NEW modified code. Instead, it run the previous CU before the changes.
I have to restart NAV in order to have NAV run the changed CU. ](*,)
Is there a fix for this ?
I'm using NAV 21009 r2
Thank you for the help!
David
I don't know if this is a common Nav Bug but sometimes when I modifiy a C/AL CodeUnit, Save+Compile and then run,
the CodeUnit doesn't launch with the NEW modified code. Instead, it run the previous CU before the changes.
I have to restart NAV in order to have NAV run the changed CU. ](*,)
Is there a fix for this ?
I'm using NAV 21009 r2
Thank you for the help!
David
0
Comments
-
when you save save-compile-run are you running it from the designer?0
-
Hey! Your Question is not clear. Whether u r changing the code on OnRun trigger of codeunit or in function in a codeunit?
first specify where u r changing the code?0 -
Hi,
I think the "SingleInstance" property is set to Yes.
rt?0 -
himanshi wrote:Hey! Your Question is not clear. Whether u r changing the code on OnRun trigger of codeunit or in function in a codeunit?
first specify where u r changing the code?
I modify the codes in any methods of my own CodeUnit that I've created.
For example, I add a line like:MESSAGE('Hello World');
Then I save and compile and Run the CodeUnit.
The message box shows up correctly.
After that I go back to the CodeUnit and put that same line in comment and compile it://MESSAGE('Hello World');
But when I run it, the message box still shows up. Moreover, I can see that the line is not commented inside the debugger.
To work around this, I have to completely close and restart NAV...
I work in a virtual machine which shares the nav application with other coworkers but each one of us logs in their own Windows account.
Also, the SingleInstance property is set to "NO" but that's not the problem.
Any idea what could it be ? :-k
Thanks,
Dave0 -
Try this
For example, add a line like:
Write this code either in a function or On the OnRun trigger of the codeunit.MESSAGE('Hello World');
Then save and compile and Run the CodeUnit. And also check the Single instance property is set to No.
The message box shows up the message.
after that go back to the CodeUnit and put that same line in comment and compile it://MESSAGE('Hello World');
, the code will not be run.
If you set the single Instance Property to yes then only this problem occurs. that you have to start Navision again...0 -
I think the "problem" here is the object cache. Am i correct in assuming you are checking the new code on a DIFFERENT machine than the one you are coding on ? if so, you need to restart NAV, because if it has been used recently, the old version of the codeunit will still be in the cache.0
-
Hi everyone,
Thank you for the help.
I think I found the solution which is as silly as leaving only one Codeunit open.
I actually had two or more same CU Windows opened in the background. #-o0
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