Advanced Topics
Memorized Transactions
3 min
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 automating repeat transactions salesforce repeating transactions can be accomplished by leveraging breadwinner within salesforce by using https //developer salesforce com/docs/atlas en us 238 0 apexcode meta/apexcode/apex batch htm or https //help salesforce com/s/articleview?id=sf flow concepts trigger schedule htm to repeatedly create netsuite transactions, netsuite's memorized transaction functionality can effectively be mimiced in salesforce netsuite repeating transactions can be created in a similar way to the salesforce method above, using https //docs oracle com/en/cloud/saas/netsuite/ns online help/section 4387799491 html and using a https //docs oracle com/en/cloud/saas/netsuite/ns online help/section 1508948660 html invoiceobject = record copy({ type record type invoice, id \<internal id of invoice to copy> }); //update invoice record fields if you want invoiceobject save(); 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