Default the number series on the form
sneha
Member Posts: 191
I have defined two separate number series codes for Sales Order Number generation, ISO and ESO (Internal and External Orders).
We have two separate sales orders forms (ISO form and ESO form), one for Internal Orders creation and other for External Order creation. But, list form is unique. That means, user can select the External Order through ISO form.
When user clicks F3 on ISO form, I always want to default the new number series to ISO series (irrespective of xRec.Sales Order Number Series) . Please suggest
We have two separate sales orders forms (ISO form and ESO form), one for Internal Orders creation and other for External Order creation. But, list form is unique. That means, user can select the External Order through ISO form.
When user clicks F3 on ISO form, I always want to default the new number series to ISO series (irrespective of xRec.Sales Order Number Series) . Please suggest
0
Comments
-
Turn on the debugger, create a new sales order, trace the code and figure out how it decides which numbering series to use. Where it finds this in a certain setup, figure out a way to store a second (and perhaps even a third or more) numbering series, and program this process to include a condition under which it decides which numbering series to use.
Hint: it has nothing to do with the form you are using.0 -
Thank you Denster! I have added below three lines of code to OnNewRecord trigger of the form and solves my current issue
SalesSetup.get;
"No. Series" := SalesSetup."Internal Order Nos."; // SalesSetup."External Order Nos." for External Orders
xRec."No. Series" := SalesSetup."Internal Order Nos.";// SalesSetup."External Order Nos."; for External orders0 -
That achieves your goal but it is not the right way. Code like that should never reside on the form.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
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 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
