Hi,
Recently I got the requirement to settle customer so I used the below code for example taken from blog
CUSTTABLE originator = CustTable::find(‘CAHM-1066’);
CustVendOpenTransManager SettleManager;
Custtransopen custtransopenfrom, custtransopento;
;
SettleManager = custVendOpenTransManager::construct(originator);
The originaor will be custtable however it gives me an error saying that it is expecting ledgerjournaltrans record
//finding debit amount record
select firstonly1 custtransopenfrom
where custtransopenfrom.AccountNum == originator.AccountNum
&& custtransopenfrom.RefRecId == 5637165579;
SettleManager.updateTransMarked(custtransopenfrom, true);
SettleManager.updateSettleAmount(custtransopenfrom, 200);
SettleManager.settleMarkedTrans();
This is not creating any transaction in the customer transaction table
Has anyone worked on such thing.
I need to do same thing for the vendors too.