Is there a way to trigger a user event script from...
# suitescript
s
Is there a way to trigger a user event script from another user event script without going through a suitelet or map/reduce script?
c
No, by design
s
Why not combine the 2?
s
That's what I'm thinking I'm going to have to do
oh wait, the scripts. One is created from a 3rd party contract and we want to keep the user event separate
s
What's your trigger to execute the 2nd UE and what is it doing exactly?
s
I'm not entirely certain. It does seem that it should trigger something as it is creating a transfer order. So if their user event is attached to that, it should trigger....unless they are excluding it
s
Both scripts should run independently if they are deployed on the same record. If you want to trigger the 2nd script from your 1st script, I'd recommend understanding what exactly is the 2nd script doing and update your 1st script to do the exact same thing.
is the 2nd script locked?
c
@Shubi That's not a reasonable solution
the second script might be a 300 line third party script.
e.g. a tax calc might have to happen whenever an SO is saved, that's what the second script could be doing. You would not want to try and port that behaviour into your script.
@screnshaw it's a shitty work around but can your script run on a schedule rather than realtime? That will at least allow the second UE script to run.
👍🏼 1
s
Why not? update script 1 to do what script 2 is doing and undeploy script 2. I'm not suggesting to copy & paste the code.
c
That's really not a reasonable solution
s
That's your opinion!
c
That script could be part of a much larger solution and now you're trying to decompose functionality out of what could be a monolith
👍🏼 1
It's my professional engineering opinion
s
Again! understand what it is doing and then decide what to do and if or not it's going to break anything!
c
Which might not be possible at all
s
Well not everyone can do it lol
c
We're getting an unknown error from a netsuite script which is locked in their bundle, in that scenario we can't do what you're saying
and it wouldn't be desirable even if we could
s
Dude, you don't even know if it's locked. Nvm, it's pointless. Enjoy your day
c
@Shubi you sound like a cowboy
c
Weird interaction.
☝️ 2
k
message has been deleted
👍🏼 1