I wrote a custom "Customer Past Due Letter" using a suitelet a while back. At the beginning it worked fine no issues. Now that we've been using NS for about 6 months apparently there are too many "dead beats" not paying in a timely manner and as a result I'm getting a governance script error.
The purpose of the "Customer Past Due Letter" is to generate a single PDF file that has a custom letter for each customer that are past due during the period, this is to make it easy for printing purposes.
The pseudo logic is as follows:
1) Declare a string (strXML) that will be used to contain an XML string for all data used to generate a single PDF file.
2) Generate an array of customers based on a Search for all customers that are past 60 days due.
3) Loop - For each customer, run a search to acquire their open invoices (#, PO, amount, etc.)
4) Build an XML String for this customer (strCustXML).
5) Add the XML string for the customer to string declared in Step 1 (strXML = strXML + strCustXML).
6) When complete use nlapiXMLToPDF(strXML) to generate the single PDF.
Here's my thought on how I can resolve the governance issue.
In step 3) pass the customerID value to a separate NS script that would return a string value equal to Step 4.
The issue I have is I'm not sure what suitescript object (suitelet, restlet, portlet?) I can use/deploy that can accept a parameter(s) and pass back as a string.
Any suggestions would be greatly appreciated.
Thanks,
Ken