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 thought on “Forms with Line No. and Filter

  1. Artem says:

    Tnx! It works great – saved me lots of time)

Leave a Reply

%d bloggers like this: