Hi,
I need to update the Blocked field of the customer card according the customer cards Balance LCY value.If Balnce LCY > Credit Limit(LCY) of the customer card then Blocked field need to be update with 'Ship'.
I tried this by writing codes on the Balance LCY and Blocked fields onValidate triggers and then On Insert trigger of Customer. but its not updating properly in the Blocked fields.I think this is due to Balnce LCY is updating from Detail Cus Ledger Entry table.
Any idea?
Roi
0
Comments
Just a suggestion : why not do this check in the posting routines? These codes adjust the balance so you have you trigger ?? ?
I tried it by writing codes on the On Insert trigger of the Detail cust. Ledger entry,but its not updating the customer table.I entered Cash Receipt Journal and checked.
The code which I wrote as follows.
OnInsert()
IF INSERT = TRUE THEN
BEGIN
CustNo := "Customer No.";
Cust.SETFILTER(Cust."No.",CustNo);
IF Cust.FIND('-') THEN
BEGIN
Cust.New := TRUE;
Cust.MODIFY
END;
END;
Anyidea??
Roi