Temporary record trigger invocation (PC0027)
Calling Insert, Modify, or Delete with RunTrigger = true on a temporary record will not execute database triggers because temporary records are not persisted. This is often unintentional and can lead to missing business logic execution.
Example
The following code runs triggers on a temporary record:
codeunit 50100 MyCodeunit
{
procedure CreateTempRecord()
var
TempCustomer: Record Customer temporary;
begin
TempCustomer.Init();
TempCustomer."No." := 'TEMP001';
TempCustomer.Insert(true); // Temporary record trigger invocation [PC0027]
end;
}
Consider whether triggers should be invoked. For temporary records, typically use:
codeunit 50100 MyCodeunit
{
procedure CreateTempRecord()
var
TempCustomer: Record Customer temporary;
begin
TempCustomer.Init();
TempCustomer."No." := 'TEMP001';
TempCustomer.Insert(false);
end;
}