Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Help with customizing payment file template
Hello,
We have a requirement to group payments in payment file based on the due date. I have achieved that. But bank and Entity details are fetched based on payment_index. So in the generated payment XML File, there is mismatch between payment and entity/bank details.
So I tried to use the following logic the payment file template
<#list ebanks?filter(p -> p.custrecord_2663_parent_vendor == payment.entity) as ebank>
<#assign entity = entities[ebank?index]>
</#list>
But get following error and the payment file is not generated
{"type":"error.SuiteScriptError","name":"UNEXPECTED_ERROR","message":"An unexpected SuiteScript error has occurred","id":"f7a81a2b-9d9e-43d5-9068-88fb6b99fb2b-2d323032342e31312e3138","stack":["Error\n at Object.renderAsString (/SuiteBundles/Bundle 416781/src/lib/wrapper/9997_NsWrapperTemplateRenderer.js:42:30)\n at Object.generateFile (/SuiteBundles/Bundle 416781/src/app/9997_EPPaymentFileGenerator.js:34:48)\n at Object.execute (/SuiteBundles/Bundle 416781/src/comp/ss/9997_payment_file_generator_ss.js:148:63)"],"cause":{"type":"internal error","code":"UNEXPECTED_ERROR","details":"An unexpected SuiteScript error has occurred","userEvent":null,"stackTrace":["Error\n at Object.renderAsString (/SuiteBundles/Bundle 416781/src/lib/wrapper/9997_NsWrapperTemplateRenderer.js:42:30)\n at Object.generateFile (/SuiteBundles/Bundle 416781/src/app/9997_EPPaymentFileGenerator.js:34:48)\n at Object.execute (/SuiteBundles/Bundle 416781/src/comp/ss/9997_payment_file_generator_ss.js:148:63)"],"notifyOff":false},"notifyOff":false,"userFacing":true}