Tim_Pedersen
09/22/2021, 7:40 PMTim_Pedersen
09/22/2021, 7:41 PMfunction customizeGlImpact(transactionRecord, standardLines, customLines, book) {
var countStandard = standardLines.getCount();
nlapiLogExecution("DEBUG", "Line Count", standardLines.getCount());
//To get the first standard line which appear in the GL impact
var currLine = standardLines.getLine(0);
//To get the entity from the standard line
var entityId = currLine.getEntityId();
//To get the subsidiary which is chosen on the transaction
var tranSubsidiary = transactionRecord.getFieldValue('subsidiary');
//To get the record type of the transaction
var recordType = transactionRecord.getRecordType();
nlapiLogExecution("DEBUG", "Subsidiary", tranSubsidiary);
//To add new custom line in the GL impact
var newLine = customLines.addNewLine();
newLine.setDebitAmount(45.21);
newLine.setAccountId(125);
newLine.setEntityId(entityId);
newLine.setMemo("Test Debit Amount");
//To add new custom line in the GL impact
var newLine = customLines.addNewLine();
newLine.setCreditAmount(45.21);
newLine.setAccountId(568);
newLine.setEntityId(entityId);
newLine.setMemo("Test Credit Amount");
}CD
09/22/2021, 8:00 PMTim_Pedersen
09/22/2021, 8:02 PMTim_Pedersen
09/22/2021, 8:04 PMTim_Pedersen
09/22/2021, 8:04 PMbattk
09/22/2021, 8:10 PMbattk
09/22/2021, 8:11 PMTim_Pedersen
09/22/2021, 8:12 PM