What happens if an error occurs after my subscriber is bound and before is unbound? Will the subscriber remain bound or will the binding be rolled back?
customer with a {Customer.”Payment Method Code”} = FACTOR has a {Customer.”Balance Due (LCY)”} > 5.00 then set the {Customer. Blocked) = Ship how can we do this condition in al code?
3 months late but oh well...here is my code snippet : CustRec.CalcFields(CustRec."Balance (LCY)"); if (CustRec."Payment Method Code" = 'FACTOR') AND (CustRec."Balance (LCY)" > 5) then begin CustRec.Blocked := CustRec.Blocked::Ship; CustRec.Modify(); end; //CustRec is a variable referencing the customer table aka CustRec: Record Customer; //Balance (LCY) is a flowfield so always mind using CalcFields() //Customer.Blocked is an ENUM so I advise using CustRec.Blocked::Ship //CustRec.Modify(); is required since CustRec is being modified (you can use CustRec.Modify(true) inorder to trigger the table's triggers) // Flies away
Super. Short and sweet explanation
Please create video on more BC technical in a series wise. I like your video too much
What happens if an error occurs after my subscriber is bound and before is unbound? Will the subscriber remain bound or will the binding be rolled back?
customer with a {Customer.”Payment Method Code”} = FACTOR has a {Customer.”Balance Due (LCY)”} > 5.00 then set the {Customer. Blocked) = Ship how can we do this condition in al code?
if Customer."Payment Method Code" = 'FACTOR' and Customer."Balance Due (LCY)" > 5.00 then
Customer.Blocked := 'Ship';
end;
3 months late but oh well...here is my code snippet :
CustRec.CalcFields(CustRec."Balance (LCY)");
if (CustRec."Payment Method Code" = 'FACTOR') AND (CustRec."Balance (LCY)" > 5) then begin
CustRec.Blocked := CustRec.Blocked::Ship;
CustRec.Modify();
end;
//CustRec is a variable referencing the customer table aka CustRec: Record Customer;
//Balance (LCY) is a flowfield so always mind using CalcFields()
//Customer.Blocked is an ENUM so I advise using CustRec.Blocked::Ship
//CustRec.Modify(); is required since CustRec is being modified (you can use CustRec.Modify(true) inorder to trigger the table's triggers)
// Flies away