I have a sales header card request and detail request line card, so I must to link a record of Request header with a record Request Header Line; well to do that I have used
in the OnInsert trigger this sentence :
IF RequestLine.FINDLAST THEN
"Line No." := RequestLine."Line No." + 10000
"Line No." := 10000;
The record of Request Header Line has a key formed from "Line No." and "Request No.".
I must fill my key in before that NAV adding a new record.