does anybody know how to force the triggering of a...
# suitescript
m
does anybody know how to force the triggering of a record’s user event from another record’s user event
e
Either use the code in the target records afterSubmit in a custom module and call it directly or use a suitelet
m
call it directly how?
like record.afterSubmit
something like that
e
I mean move the code from the afterSubmit into a custom module and call that
m
oh i see
because the other ooption i thought was to use a suitelet but you mean create another module, and call a function from that module inside my after submit
👍 1
thank you
n
using the Suitelet will be a better approach because it will trigger all the user events, some possibly can be related to the field that you are changing.
m
in fact i need to trigger a workflow linked to that record
what seems weird to me is that in order to be able to trigger this workflow I need to create a suitelet which only goal is to trigger the workflow
it sounds strange
n
it sounds strange but think in terms of infinite loop if one UE starts to trigger another UE.
m
i know the reason why they do not allow it
thank you
r
If you need to only trigger a workflow, there is a function for it in the
N/task
module
m
The suitelet did the trick thanks anyway for the suggestion