1

I am new to Netsuite. My company has a Netsuite instance with many customization scripts. Currently we are doing some automated testing, so we need that script to be executed for loading data from external system.

Most of those scripts are scheduled for 1 hr. In order to avoid the wait for scheduled run I am wondering if there is any way to trigger those scripts using APIs ondemand ?

1
  • 1
    The task.ScheduledScriptTask link that W3BGUY posted is what you are looking for assuming you want another suitescript (user event script perhaps?) to trigger your scheduled/map_reduce scripts. Commented Oct 16, 2019 at 13:21

1 Answer 1

2

As far as I am aware the only way you could do that, would be to write a RESTlet that you could call externally. Are these all scheduled scripts, or also Map/Reduce? Are you specifically needing to run the scripts externally, via an external call?

If you do not need to run them externally, the best way would be to simply unschedule the deployment (or just make a duplicate deployment - depending on whether the deployment ID is hardcoded in a call in the script), and save and execute that deployment. That will trigger the script to act as though it was time for it to run.

If you need to call it externally, I'd just write a simple GET RESTlet that calls the scheduled script. You can find information about that here at these two links.

*Make sure you are logged into NetSuite before trying to click the links

SuiteScript 2.0 RESTlet Script Type

task.ScheduledScriptTask

Hope that helps out.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.