Forms with Line No. and Filter

Some forms in Dynamics NAV use the property “AutoSplitKey”.  That means that the “Line No.” field will be automatically assigned the next line number or a number between lines if the user tries to insert a line between two lines.

If the user adds a filter to the form then this will fail.  I created a code that will solve this problem.  First you need to reset the “AutoSplitKey” property.  Then you create two functions.

 

And then insert this code on the “Form – OnNewRecord(BelowxRec : Boolean)” trigger.

This will create automatically assign a “Line No.” to your line even if you are using filter.

One Reply to “Forms with Line No. and Filter”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.