On Sales Order save, if you transform to an IF and...
# suitescript
s
On Sales Order save, if you transform to an IF and save, should it trigger the Item fulfillments user event scripts?
j
It won't trigger the UE scripts if you're transforming it in a UE script
s
Even though it's a sales order user event script? I thought the IF ue scripts would trigger still
j
Not as far as I know. I usually use a backend suitelet for stuff like that. SO UE script > Suitelet > IF UE scripts
s
does your suitelet have to be the external url?
j
Unfortunately yes
s
Thanks. Wish they had an easy way to call it without making it external or have the token info
j
I mean, I guess you could also have the UE script trigger a scheduled script on demand
But you might run into issues where you run out of available deployments
s
True. If I need it, i'll probably have it call a suitelet.
I have a library that allows me to, with login info, call a netsuite url, I just wish netsuite would let ya call it without it
j
Another thing to maybe try is to use a workflow to transform the SO into an IF. I don't think I've done that and would be interested to know if that triggers the IF UE scripts
c
workflow action scripts can trigger UEs but workflows have the same issue. You have 2 options here here to do this in a decent way. Either have a scheduled process that picks up the Sales Orders and processes them into IF which will fire the UE or add another button that calls a suitelet (does not need to be available without login) that does the transform and saves which will fire the UE.
s
@creece How do you call the internal suitelet without it being available without login?
c
@screnshaw you're already authenticated on the client side so you can use N/url.resolveScript to get the URL and add the record Type/ID as a params and in the suitelet read the params and load/save the record.
You just can't call a suitelet from a serverside script without making it available without login.
s
Ah, that's right. you have to be on the client side to do that
c
yeah thats the button click option
👍🏼 1
workflow action script would also do it if you move to a workflow but its more work