Dynamics 365 Business Central: How to check if a record/table is temporary via AL

Today I would like to share another mini tip about Business Central, how to check if a record/table is temporary in AL.

A temporary table is a temporary variable that holds a table. A temporary table is used as a buffer or intermediate storage for table data.

Source : Dynamics 365 Lab
Read more…

Temporary records for GetSelectionFilter

Whenever you need to get a value1|value2|value4..value10|… field filter from a provided record variable, then the GetSelectionFilter method from the SelectionFilterManagement codeunit is your friend. However, using this function has one drawback, as you can read in the Remarks section:

Source : The BC Docs Librarian
Read more…

The Copy method on temporary records

If you ever needed to copy temporary record variables, you probably already stumbled across ToRecord.Copy(FromRecord, true), with the second parameter true being used. But be careful: it works differently than you might think!

Imagine two temporary record variables, both pointing to the same base table:

Source : The BC docs librarian
Read more…

Is My Record Temporary

Very often when developing we have logic we would like to execute on records, but only when the table is actually a real table and not when used as a temporary record. This could be things like inserting, modifying or deleting attached records in another table which would make no sense in most cases if the table you are currently in is temporary.

Bron : Thinking NAV – Thinking Differently
Lees meer…