Sales Order Release inconsistent
spider1269
Member Posts: 78
I'm seeing an issue with Sales Orders when they are released by code. I'm creating a Sales Order through code and then releasing it using the standard release function but sometimes the orders won't calculate the Amount field in the Sales Line or Sales Header. Has anyone seen this before?
ReleaseSalesDoc.PerformManualRelease(SalesHdr)
0
Comments
-
The Amount field on the sales header is a flowfield. If you are releasing the order in code, you will need to do a CALCFIELD on the Amount field to update the value in code. On a form/page you don't have to do this in code because the form/page object will do that for you.0
-
That's already being done. What will happen is I'll go to the Sales Order List and the Amount field there will say $0 and all the line items will show $0 as the amount even though the order is released.0
-
I'm creating a Sales Order through code
are you validating all the necessary fields?0 -
That's the odd thing. If I manually release it it's fine. Even when I release it through code it will work 80% of the time.0
-
Sounds to me like someone modified the release codeunit, maybe put a commit in there somewhere, commented out an error message, put some code on the form/page or something like that.
You need to figure out what happens differently during the 20% that it doesn't work, and debug those instances. Steps to recreate is your first priority, recreate a situation where it always goes a certain way. What is different about an order that releases properly and one that doesn't. You're in trouble if the same order has two different results in two subsequent release attempts.0 -
Thanks Denster! You put me on the right path. I found code from 5 years ago that skipped the UpdateUnitPrice function only under certain conditions.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
