SalesLine with LineNo = 0
galmok
Member Posts: 44
I created (by accident/dataimport) a SalesLine with the line number 0. This is not what I wanted and there I tried correcting the error.
I tried deleting the sales line in the Sales Order UI. Result: Navision crash.
I tried deleting the sales line in the Object Designer->Table->ID:37->Run, find the line and delete it. Result: Navision crash.
I tried changing the line no in the object designer: Result: "Do you want to rename the record?". Tried both yes and no. Yes: Cannot rename, No: Nothing done.
I am not sure how I can fix this problem. Suggestions? Do I need someone with a developer license to hack that sales line to have a line number different from 0?
At any rate, I don't feel Navision shouldn't crash due to such an error.
I tried deleting the sales line in the Sales Order UI. Result: Navision crash.
I tried deleting the sales line in the Object Designer->Table->ID:37->Run, find the line and delete it. Result: Navision crash.
I tried changing the line no in the object designer: Result: "Do you want to rename the record?". Tried both yes and no. Yes: Cannot rename, No: Nothing done.
I am not sure how I can fix this problem. Suggestions? Do I need someone with a developer license to hack that sales line to have a line number different from 0?
At any rate, I don't feel Navision shouldn't crash due to such an error.
0
Comments
-
the reason it crashes is because it runs into infinite loop.
There is code the on delete that tries to delete related sales line no. When line no is 0, it relates to it self.
Two ways to fix. Commend out the code temporary or change it to only run if line no is not 0.
Or write a report to delete that sales line without delete(true);
If you are on sql you can delete it from sql as well.0 -
Thank you for the help.
I used the suggestion of a dataport with DELETE(FALSE). I completely forgot that I could prevent the update trigger from triggering. :oops:0 -
You are welcome. It happens to all of us.0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
