Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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());