ALAppExtensions
ALAppExtensions copied to clipboard
table 39 "Purchase Line" - OnValidateTypeAfterCopyFromTempPurchLineOnBeforeInitRec
Describe the request
Can you please add the following event to table 39 "Purchase Line"?
Old code:
field(5; Type; Enum "Purchase Line Type")
{
Caption = 'Type';
trigger OnValidate()
var
TempPurchLine: Record "Purchase Line" temporary;
IsHandled: Boolean;
begin
[...]
OnValidateTypeOnBeforeInitRec(Rec, xRec, CurrFieldNo);
TempPurchLine := Rec;
Init();
SystemId := TempPurchLine.SystemId;
[...]
end;
}
New code:
field(5; Type; Enum "Purchase Line Type")
{
Caption = 'Type';
trigger OnValidate()
var
TempPurchLine: Record "Purchase Line" temporary;
IsHandled: Boolean;
begin
[...]
OnValidateTypeOnBeforeInitRec(Rec, xRec, CurrFieldNo);
TempPurchLine := Rec;
OnValidateTypeAfterCopyFromTempPurchLineOnBeforeInitRec(Rec, IsHandled);
if not IsHandled then
Init();
SystemId := TempPurchLine.SystemId;
[...]
end;
}
[IntegrationEvent(false, false)]
local procedure OnValidateTypeAfterCopyFromTempPurchLineOnBeforeInitRec(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;
Additional context
In some cases there is the need to stop the record initialization. Internal work item: AB#496079
Can you explain why do you need to skip Init() statement here?
Closed due to inactivity.