Reputation: 175
I'm going to start writing my first mass update script and am currently using a Sandbox account. I am wondering what is the best way to test the script considering it will make changes on a lot of items? Is it possible to test the script on a small sample?
Upvotes: 1
Views: 1584
Reputation: 2250
I always test it by simply feeding in an internal ID to the script, in the debugger. That is pretty much how things will run with a mass update.
Upvotes: 1
Reputation: 15402
What I often do ( this dead simple in SS 1) is to create a companion suitelet interface that just calls the mass update function
That way you pass a record id, via the suitelet params, to the mass update function and it runs immediately. In another tab you can make changes etc and then just refresh the suitelet when you want to run it again.
I find this more convenient when developing than going through the mass update interface for each development iteration.
Upvotes: 3
Reputation: 8847
When you execute a Mass Update, you have to build a search in the UI first, then you manually select which search results the script should process. Thus, the best way to test your script is to only select one result at a time, or just a few results. Perhaps build a few test records that match your search criteria and process those.
At any rate, with Mass Updates, you are in full control over which results are processed each time you execute the script.
Upvotes: 3