RE: GL Custom Lines
Dear Forum Member
Happy new year, wish all the best for 2021
Please I need help to change the account id with GL Custom line I’m using the following script
function customizeGlImpact(transactionRecord, standardLines, customLines, book)
{
var currLine = standardLines.getLine(0);
currLine.setCreditAmount(transactionRecord.getFieldValue(‘total’));
currLine.setAccountId(431);
currLine.setMemo(“Iem Receipt”);
var currLine = standardLines.getLine(0);
currLine.setDebitAmount(transactionRecord.getFieldValue(‘total’));
currLine.setAccountId(432);
currLine.setMemo(“Item Receipt”);
}
I get the following error message
TypeError: Cannot find function setCreditAmount in object com.netledger.app.accounting.transactions.plugin.CustomGlLinesPluginJavaImpl$StandardLineImpl@254ba255. (INVOCATION_WRAPPER#6) |
Thanks Dears to help
Best Regards
Farouk
Same problem as the old code, go through the documentation linked before to see what you can and cannot do with standard lines. There are some shared methods between custom and standard lines, none of which allow you to set things.