Hi everyone, I am sure this has been asked thousan...
# suitescript
v
Hi everyone, I am sure this has been asked thousands of times so I would like to apologize beforehand but can someone provide me with a link to any sample scripts for NS? I am specifically looking for a simple script that will just run and edit and save my transaction record without making any changes.
b
Do you want to create a script record or something simple that runs in the debugger or browser
j
SS1 or 2?
also, what’s the actual question you are trying to answer here?
v
I need to create a script that will run at a specific time and edit a transaction or transactions and then save them without making any actual edits.
2
my actual question is, is there a place in suite answers or other resource that gives great examples of scripts that are frequently used in NS or are a good base to build off of?
b
There are 2 places offering standard examples
Netsuite's help guide and suite answers
You would be looking at a scheduled script and the n/record module
👍 1
j
Do you just mean open the transaction for editing, but don’t set any values, and save it? Are you trying to trigger something? Why would you want to “edit without making edits”? What are you trying to achieve?
v
Yes, In a nutshell we have an integration with Avalara for tax. When bulk invoices are created and the date is in the past on the advanced billing schedule. Avalara is being called before the workflow sets the correct date on the bulk billed invoices and we need a script that can run after the creation of the invoice, and edit and save the record to force another call to Avalara to get the updated date the workflow set.
We have tried adjusting the workflow but we haven’t had any success in getting it to trigger before the call.
b
you may have been doomed in your workflow attempt, user event scripts run first, workflows second
more specifically for your question lookup NetSuite's help on SuiteScript 2.0 Scheduled Script Type, N/search Module, N/record Module
If you are processing large amounts of records, lookup SuiteScript 2.0 Map/Reduce Script Type instead of scheduled script
you may also consider a scheduled workflow if you really like workflows