I've created a custom record to which 'customer' is the parent. Under that custom record I've set a custom 'rate class' which overrides the rate on invoice transactions based on the date of service provided. All of this works fine so far.
My next challenge is to create a process to bulk create the invoices for a given date.
So far I've created 2 suitelet forms...'suitelet_1' grabs information from the rate schedule, and when submitted passes the necessary parameters to populate some filter information for 'suitelet_2', which calls a saved search (of type 'customer') and populates a sublist with checkboxes next to each result.
This is where I'm a little stuck.
When submitted, suitelet_2 creates invoices for customers with checkbox checked using nlapiCreateRecord() (this doesn't work yet, but I've used it before and know it works fine)....but I don't think this is the best practice since I'm likely to run out of available units (sometimes the sublist of customers can grow to over 100 line items).
So I'm trying, when submitting suitelet_2, to pass the unselected line items as the values to filter OUT OF a search on a scheduled script...something like this:
//on suitelet_2
var filtervariables = [];
for (some loop criteria) {
if (checkbox == 'F')
{var filtervariable = record.getValue(column[0]);
filtervariables.push(filtervariable);
}
}
//then on scheduled_script
var filtervariable = request.getParameter('filtervariables') //where this will be used in a new nlobjSearchFilter('custcol_x', null, filtervariable, null)
is it possible to store this kind of parameter to pass to a scheduled script (maybe as a textarea)?
Is there another way to do this simply that I'm not thinking of? I'm not opposed to starting the bulk process from scratch if there's an easier way.
Any help would be greatly appreciated.