You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local procedure InitDeferralCode()
var
Item: Record Item;
IsHandled: Boolean;
ShouldUpdateDeferralCode: Boolean;
begin
IsHandled := false;
OnBeforeInitDeferralCode(Rec, IsHandled);
if IsHandled then
exit;
ShouldUpdateDeferralCode := SalesLine."Document Type" in [SalesLine."Document Type"::Order, SalesLine."Document Type"::Invoice, SalesLine."Document Type"::"Credit Memo", SalesLine."Document Type"::"Return Order"];
OnBeforeUpdateDeferralCode(SalesLine, ShouldUpdateDeferralCode);
if ShouldUpdateDeferralCode then
case Type of
Type::"G/L Account":
Validate("Deferral Code", GLAcc."Default Deferral Template Code");
Type::Item:
begin
GetItem(Item);
Validate("Deferral Code", Item."Default Deferral Template Code");
end;
Type::Resource:
Validate("Deferral Code", Res."Default Deferral Template Code");
end;
end;
Additional context
We want to be able to set deferral code when document type is quote. Is it possible for the function to look something like this? :)
Internal work item: AB#561284
The text was updated successfully, but these errors were encountered:
Describe the request
Additional context
We want to be able to set deferral code when document type is quote. Is it possible for the function to look something like this? :)
Internal work item: AB#561284
The text was updated successfully, but these errors were encountered: