Memorized Transactions
NetSuite Memorized Transactions are a useful function whereby a transaction such as Sales Order or Invoice can be "memorized" for future scheduled runs. This provides an automated way to repetitvely create transactions based on a frequency an ending date or set number of runs.
Unfortunately however, at this time NetSuite has not exposed Memorized Transactions in their API or SuiteScript environments. While this would be the most efficient way to accomplish repeat transactions, it doesn't mean that it can't be done. Here are some example ways to accomplish the same outcome.
Repeating transactions can be accomplished by leveraging Breadwinner within Salesforce. By using APEX Batches or Schedule-Triggered Flows to repeatedly create NetSuite Transactions, NetSuite's Memorized Transaction functionality can effectively be mimiced in Salesforce.
Repeating transactions can be created in a similar way to the Salesforce method above, using SuiteScript Scheduled Script Type and using a Recurring Script Submission.
Combining a custom field such as "Next Invoice Date" and a search function for identifying Invoices a Recurring SuiteScript can be created which recurrs daily. With additional fields "Invoice Period" and "Invoice End Date" a script can follow this basic flow:
- Search for and retrieve all invoices with "Next Invoice Date" field holding today's date value.
- Iterate through the list of retrieved invoices
- If todays date < Invoice End Date then
- Run the JS record.copy code above to duplicate the invoice. Set the Next Invoice Date on the duplicate, to the date corresponding to Today + Invoice Period
- If todays date >= Invoice End Date then just skip it
Although not a true Memorized Transaction, it does provide repeated billing and accomplishes the same goal, until NetSuite enables MT's in either API or SuiteScript.