The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.

OnInsertRecord Trigger

Executed before a new record is inserted into the table.


[Ok]:= OnInsertRecord(BelowxRec)  

Return Value

(Boolean) This return value indicates whether the new record was inserted after the last record in the table (xRec) or not. If false, the record was inserted between an existing record and the last record. If true, the record was inserted below the last record in the table (xRec).

(Boolean) Indicates whether a new record should be inserted. The return value is checked after each call. If true, the record is inserted. If false, the record is not inserted.

Applies To

  • Pages


If an error occurs in the trigger code, the action is canceled, but the page is not closed. The user cannot enter any new data and an error is shown in the message bar.

See Also

Page and Action Triggers
Page Properties