I'm looking for a second set of eyes to see what I...
# suitescript
t
I'm looking for a second set of eyes to see what I am missing on a Custom GL Plugin Script. I can NOT get it to work for me, even when using static values in the code for simplicity. Plugins are new to me, and I've been banging my head on this for hours. I've read the documentation from NetSuite, and tried several example scripts, but no luck yet. I've included a video and I'll post the code in the thread. Anyone familiar with this plugin? https://www.loom.com/share/51420d3b231b434fb1485f1a824d36bc
function 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"); }
c
You never click on the execution log on the deployment screen - is it logging the debug message that's in your script? also, is Customization→ Plug-ins → Manage Plug-ins set ok?
t
message has been deleted
Box is checked, and execution log is empty.
message has been deleted
do all of the steps, including 9
t
Yep, I forgot the subsidiary field, so it wasn't ever running. Thank you!!
1