Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
How to Get Total from One Search to Use In Another
I need the total of all outstanding invoices to use in the calcualtion of DSO, which is done on a per invoice basis. How do I get this Total?
Here's the formula:
DSO = 0 For i = 1 TO NumberOfOpenInvoices DSO = DSO + (InvoiceAmount(i)/<span style="color:'red'"><strong>TotalAllOpenInvoices</strong></span> * DaysPastDue(i)) Next i
If this can't be done in a custom search, can it be done in Server SuiteScript? If so, can you share the code to do it?
TIA,
JMU
0