subform check

Hi all!!!

can someone please suggest me that how can i add serial no. in a subform that i have developed in Nav 13.

also it shall be incremented with every new line no.

I also have the item no. in header as well as subform and i want a validation that the header and subform item no should be same else it should give an error.

You have posted it in AX forum, moved to NAV forum.

sorry i didn’t get you.
do have a solution for the same?

Hi Yunkeek,
Will if you are creating subforms in NAV 2013, then you have your first issue! Forms “died” with NAV 2009. [;)]

Assume you mean a sub page. But there are two ways to solve it.

If item no. is part of the primary key of the table’s, then add a line no. field (integer) field to the sub table.
Then you need to enable the AutoSplitKey of your sub page.

In the main page you need to filter on the Item No. in the sub page is the same.

If item no. is not part of the primary key, then instead you should create functionality to automatically insert the item no. into the sub table, whenever new lines are created. You could do this in the OnInsert trigger. You would still need to include the primary key of the main table in your sub table, to be able to lookup the item number.

I would also make the item no. field in the sub table not editable, and not show it in the sub page.

pastedimage1516794792588v1.png

[:O]