No of lines on a form

aliennav
Member Posts: 449
Hi
I want to restrict the user not to enter more than 5 lines in sales line while making invoice.
Kindly suggest how it can be done using COUNT function.
Thanx in advance
I want to restrict the user not to enter more than 5 lines in sales line while making invoice.
Kindly suggest how it can be done using COUNT function.
Thanx in advance
0
Comments
-
in sales invoice or in order also while posting invoice?0
-
Do you want to restrict or notify the entry person?
an easy notification would be to add code to the salesline subform
IF COUNT > 5 THEN MESSAGE('5 lines max preferred');0 -
mohana_cse06 wrote:in sales invoice or in order also while posting invoice?
the main aim is to restrict it on invoice.0 -
Savatage wrote:an easy notification would be to add code to the salesline subform
IF COUNT > 5 THEN MESSAGE('5 lines max preferred');
u can follow this.0 -
I normally put the validation on release/post of sales invoice. Further I will create a field in Sales & Receivable Setup to define the value of permissible lines (Where 0 means n number of lines) and use the value in validation.
Pre-Printed formats creates such problems. Are you facing the same?CA Sandeep Singla
http://ssdynamics.co.in0 -
ssingla wrote:I normally put the validation on release/post of sales invoice. Further I will create a field in Sales & Receivable Setup to define the value of permissible lines (Where 0 means n number of lines) and use the value in validation.
Pre-Printed formats creates such problems. Are you facing the same?
Yes i am facing the same problem.
Also, if I want to use using COUNT as mentioned above, on which trigger it is advisable to write a code so that in invoice no. of records shouldnt exceed the required level.0 -
aliennav wrote:ssingla wrote:I normally put the validation on release/post of sales invoice. Further I will create a field in Sales & Receivable Setup to define the value of permissible lines (Where 0 means n number of lines) and use the value in validation.
Pre-Printed formats creates such problems. Are you facing the same?
Yes i am facing the same problem.
Also, if I want to use using COUNT as mentioned above, on which trigger it is advisable to write a code so that in invoice no. of records shouldnt exceed the required level.
The best place to put this is in the Code unit Sales Order Release second place would be in Code Unit 80.
Also NEVER hard code something like this. Add a field to Either the Location table, the User Setup table or the Sales& Rec setup table, to say hom many lines are allowed, and make sure that 0=unlimited.
Don't put the code on the form or in triggers on the sales line table.David Singleton0 -
David Singleton wrote:aliennav wrote:ssingla wrote:I normally put the validation on release/post of sales invoice. Further I will create a field in Sales & Receivable Setup to define the value of permissible lines (Where 0 means n number of lines) and use the value in validation.
Pre-Printed formats creates such problems. Are you facing the same?
Yes i am facing the same problem.
Also, if I want to use using COUNT as mentioned above, on which trigger it is advisable to write a code so that in invoice no. of records shouldnt exceed the required level.
The best place to put this is in the Code unit Sales Order Release second place would be in Code Unit 80.
Also NEVER hard code something like this. Add a field to Either the Location table, the User Setup table or the Sales& Rec setup table, to say hom many lines are allowed, and make sure that 0=unlimited.
Don't put the code on the form or in triggers on the sales line table.
I'll try it.
Thanx0
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