The restlet will give you more execution units but...
# suitescript
j
The restlet will give you more execution units but I don't think more time. Are you starting the Suitelet via HTTPS module.. if so longer slow to respond URL's NetSuite will I think drop the connection. Have you considered a scheduled script task that the user event fires up instead?
m
Hi @JohnnyC I can create a scheduled script, doing this would be an asynchronous call the requirement at my end is synchronous. Could you suggest any other way? Thanks
j
I don't see how you can. It looks to me like the Suitelet isn't able to complete the record creation fast enough given the TIME_EXCEEDED error. What record type is the user event associated with that calls the Suitelet.
m
salesorder is the record type
The only issue we have to use suitelet is because if we submit the sales order in user event script it won't execute user event script attached to sales order
j
Sorry you have a sales order user event script calling a Suitelet that creates another sales order?
m
No sorry so that is a custom record
j
oh ok phew
m
🙂Sorry I misunderstood the question
j
In your Suitelet creating the sales order have you added some logging to see how far it gets before you get the TIMEOUT error
m
so the request is sent to save the order but by the time I get the internalid of salesorder the error is thrown back
And even when the script is timed out it creates the sales roder even after the issue.
j
So custom record saves, that user event calls a Suitelet the sales order gets created, but the user event call to the Suitelet is timing out?
but sales order completes successfully
Also when you said you tried to create the record in the user event after submit of the custom record but that the sales order user event wouldn't fire. Just double check to make sure the sales order user event script doesn't have any type or execution context if statements that the Suitelet doesn't fall into
m
Correct @JohnnyC, sales order completes successfully.
I have checked with the context it is same which suitelets runs into.