My navision get closed when i select the variant code in production order line, Any solutions.

Seemab07
Member Posts: 32
I am working in navision 2013r2 when i select the variant code in production order line my navision gets closed. My table no is 5406 i.e Prod. Order Line.
0
Best Answer
-
Try recompiling all the objects.
In my experience it happens sometimes (client closing pages or crashes) when a code touches an object, which has invalid references - a variable defined based on non-compiled table or page, a field having a relation to non-existing table or field - by the way, the latter may not pop-up during compilation.
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035
Answers
-
Try recompiling all the objects.
In my experience it happens sometimes (client closing pages or crashes) when a code touches an object, which has invalid references - a variable defined based on non-compiled table or page, a field having a relation to non-existing table or field - by the way, the latter may not pop-up during compilation.
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035 -
After compiling the table its work fine..0
-
TESTFIELD("Finished Quantity",0);
CALCFIELDS("Reserved Quantity");
TESTFIELD("Reserved Quantity",0);
WhseValidateSourceLine.ProdOrderLineVerifyChange(Rec,xRec);
IF "Variant Code" = '' THEN BEGIN
VALIDATE("Item No.");
EXIT;
END;
ItemVariant.GET("Item No.","Variant Code");
Description := ItemVariant.Description;
"Description 2" := ItemVariant."Description 2";
The following code is written on validate.0 -
i need a permanent solution same thing happening everytime i have to compile the table
i.e production order line.0 -
Is that all the code in Variant Code - OnValidate in your version?
I don't have 2013R2, but in 2017 there are 2 more lines of code. If you have them perhaps the problem is somewhere in functions called at the end of OnValidate.
As I've said in cases I have seen the problem was not in the code, but in the metadata. For example - one place calling some function in some other codeunit, and in this called function there was a variable based on some table, and the table was not compiled. The table variable has not been even used in the code, was just a leftover after some other removed bits of code, yet it had an impact.
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-031
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