wrong expression

ara3n
Member Posts: 9,258
I've run into this problem a couple of times. The CU is compiled and is running on live system.
when you design it, you see that
is written in Codeunit in certain area and would not compile.
I would have to find out what the actual code is and compile it again.
It mostly happens when a function is called.
when you design it, you see that
wrong expression
is written in Codeunit in certain area and would not compile.
I would have to find out what the actual code is and compile it again.
It mostly happens when a function is called.
0
Comments
-
If had this too once...
It happens when you change fieldnames ( making them longer ) used in the CU AFTER this CU has been compiled. It is then possible that when NAV decompiles the CU to show it on screen, the line doesn't fit anymore ( there is a maximum line length ) , and you get the "wrong expression" thing.
Example :
let's say ( just for the example ) that the maximum line length is 30 characters.
if you have this line :setrange("Order no.",Orderno);
if you then change the fieldname in the original table to "Purchase Order No.", and you open the CU, the error will occur, because the line length has gone over the 30 characters !0 -
That makes sense.
Thanks.0 -
I know this topic is a bit old, but I just ran into this "wrong expression" in a NAV 2009 CodeUnit and I cannot find a way to recover from that...
I exported the code unit in text and it presents the same thing as in the C/AL editor, thought I could do something by exporting in .fob and reimporting into a plain Cronus database but it does the same as well.
Any idea what can be done?0 -
It could be any line where it's more than certain length. You need to find the longest line and see if you had increased the name of the field or variable. Once you find it the line split in half0
-
Thanks for the very quick reply Rashed and I understand what you mean, but take a look at the snapshot below:
My understanding is that there is some code "behind" the Wrong Expression line... Am I right? And if so, is there a way to recover it?
Thanks again.0 -
If you have enabled Service tier boolean checked in file->Company->alter, you can look at c# code. That's the only thing I can think of.0
-
sylvainroy wrote:My understanding is that there is some code "behind" the Wrong Expression line... Am I right? And if so, is there a way to recover it?
Thanks again.
I encountered this behavior making a manual .txt merge and importing the object with a line longer than 132 characters: in that case hopefully I kept the original source objects and manually modified the line.
Do you have a previous codeunit version to check?* Daniele Rebussi * | * Rebu NAV Diary *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