Hi,
I am trying to create a custom "report" suitelet script to generate a CSV file containing rows where, for each row, thousands of usage units are required for calculating dependent columns/fields. The usage is due to complex record line item and date-dependent formulas which do not seem remotely possible using Saved Search formulas (for example, any given row's values can depend on the values in 20 separate records). The results also potentially change every day so it seems there is no point in pre-calculating and storing the results.
I am already using nlapiRequestURL() to offload calls that process each row to new suitelet instances (where response.write() is used for the formula result), so my script currently uses tens of thousands of usage units without a problem.
However, if a report has hundreds of these rows, then the calls to "nlapiRequestURL()" alone will cause the suitelet to go over the usage limit.
In order to defeat the usage limit do I:
1. have to rewrite this suitelet to work recursively or otherwise further abstract by invoking nlapiRequestURL() for "blocks of rows" at a time?
2. have to rewrite this suitelet as a Web Service script and host it separate from NetSuite?
3. use some other trick(s)?
(1) seems like this will make what I am trying to do impossible to read and is probably going to lead to future problems depending on NetSuite.
(2) seems to be doable but a bit of a pain (I think the restrictions are only on the number of record results per request, not number of requests).
(3) maybe ask NetSuite for a script exemption?
Does anyone have experience with this or any suggestions? Would be appreciated, thanks!