Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Custom GL on InterCompany transactions
Hello,
I have a need to create IC code also to balance sheet.
I imagine to do this with custom GL but i'm facing some errors.
Has anyone done script like this?
My code :
function customizeGlImpact(transactionRecord, standardLines, customLines, book){
var newLine = customLines.addNewLine();
newLine.setCreditAmount(transactionRecord.getFieldValue('total'));
newLine.setAccountId(standardLines.getLine(0).getAccountId());
newLine.setMemo("CustomGL");
newLine.setBookSpecific(true);
newLine.setEntityId(standardLines.getLine(0).getEntityId());
var newLine = customLines.addNewLine();
newLine.setDebitAmount(transactionRecord.getFieldValue('total'));
newLine.setAccountId(standardLines.getLine(0).getAccountId());
newLine.setSegmentValueId('cseg_gs_ic_code', 3); //This is the wanted value in the custom segment.
newLine.setBookSpecific(true);
newLine.setEntityId(standardLines.getLine(0).getEntityId());