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 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?
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.
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 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.
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
an easy notification would be to add code to the salesline subform
IF COUNT > 5 THEN MESSAGE('5 lines max preferred');
http://www.BiloBeauty.com
http://www.autismspeaks.org
I want to restrict on sales order so it couldnt pass on sales invoice.
the main aim is to restrict it on invoice.
u can follow this.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Pre-Printed formats creates such problems. Are you facing the same?
http://ssdynamics.co.in
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.
Thanx