Hi Experts,
Can we restrict users from entering a new line in-between the lines?
Usually System automatically generates a line number as 10000,20000,……..
Client considering a line number as 1,2…. And always want that line number must be in sequence.
But somehow users entering a new line in-between the lines, when user enters a new line in-between 10000 and 20000, system automatically generating a line number as 15000. How can we restrict the users from entering a new line in-between the lines?
0
Answers
Line2.SETRANGE("Document Type","Document Type");
Line2.SETRANGE("Document No.","Document No.");
Line2.SETFILTER("Line No.",'>%1',"Line No.");
IF NOT Line2.ISEMPTY THEN
ERROR('You cannot add an in-between line');
Line2 is a variable type Record for the Line table. You need to add it as a local variable, to the OnInsert trigger.
regards
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Then the "line No." is 0
Yes garak,you are right #-o
Thanks
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
But explain the customer, what for an comfort then he lost.