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
Please add the IsHandled --> Exit pattern to the OnValidateBillToCustomerNoOnAfterCheckBilltoCustomerNoChanged Publisher in the "Bill-to Customer No." OnValidate trigger.
Previous Code
field(4; "Bill-to Customer No."; Code[20])
{
Caption = 'Bill-to Customer No.';
NotBlank = true;
TableRelation = Customer;
trigger OnValidate()
var
IsHandled: Boolean;
begin
TestStatusOpen();
BilltoCustomerNoChanged := xRec."Bill-to Customer No." <> "Bill-to Customer No.";
IsHandled := false;
OnValidateBillToCustomerNoOnAfterCheckBilltoCustomerNoChanged(Rec, xRec, CurrFieldNo, IsHandled);
if BilltoCustomerNoChanged and not IsHandled then
if xRec."Bill-to Customer No." = '' then
InitRecord()
else
if ConfirmBillToCustomerChange() then begin
OnValidateBillToCustomerNoOnAfterConfirmed(Rec);
SalesLine.SetRange("Document Type", "Document Type");
SalesLine.SetRange("Document No.", "No.");
CheckShipmentInfo(SalesLine, true);
CheckPrepmtInfo(SalesLine);
CheckReturnInfo(SalesLine, true);
SalesLine.Reset();
end else
"Bill-to Customer No." := xRec."Bill-to Customer No.";
... // other code
end;
}
New Code
field(4; "Bill-to Customer No."; Code[20])
{
Caption = 'Bill-to Customer No.';
NotBlank = true;
TableRelation = Customer;
trigger OnValidate()
var
IsHandled: Boolean;
begin
TestStatusOpen();
BilltoCustomerNoChanged := xRec."Bill-to Customer No." <> "Bill-to Customer No.";
IsHandled := false;
OnValidateBillToCustomerNoOnAfterCheckBilltoCustomerNoChanged(Rec, xRec, CurrFieldNo, IsHandled);
if IsHandled then
exit;
if BilltoCustomerNoChanged and not IsHandled then
if xRec."Bill-to Customer No." = '' then
InitRecord()
else
if ConfirmBillToCustomerChange() then begin
OnValidateBillToCustomerNoOnAfterConfirmed(Rec);
SalesLine.SetRange("Document Type", "Document Type");
SalesLine.SetRange("Document No.", "No.");
CheckShipmentInfo(SalesLine, true);
CheckPrepmtInfo(SalesLine);
CheckReturnInfo(SalesLine, true);
SalesLine.Reset();
end else
"Bill-to Customer No." := xRec."Bill-to Customer No.";
... // other code
end;
}
Additional context
We need to run our own code in certain instances and be able to skip the standard validate trigger. Same implementation as you already have in the "Sell-to Customer No." OnValidate trigger.
The text was updated successfully, but these errors were encountered:
Describe the request
Please add the IsHandled --> Exit pattern to the OnValidateBillToCustomerNoOnAfterCheckBilltoCustomerNoChanged Publisher in the "Bill-to Customer No." OnValidate trigger.
Previous Code
New Code
Additional context
We need to run our own code in certain instances and be able to skip the standard validate trigger. Same implementation as you already have in the "Sell-to Customer No." OnValidate trigger.
The text was updated successfully, but these errors were encountered: