RE: Call a SuiteLet from a User Event Script, then display confirmation message
Hello,
I need to call a suiteLet from a UserEventScript (in after commit function). After a long period of search, try and error, I could manage to do it like that (sample of code) :
As expected, in the afterSubmit event, the suitelet is called, then the user is redirected to the original record.
BUT : there is one side effect, because the user was redirected (even if it is invisible for him), he does not have any confirmation message !
Users are used to the message. Having no confirmation seems like the record was not successfully created.
SO :
- Is the “redirect.toSuitelet” then “redirect.toRecord” method a good solution ? If not, how could I do it differently ?
- How could I display a message after the redirection ?
Thanks in advance 🙂 ,
Loïc
- what are you doing in the suitelet that you can not do in your aftersubmit user event?
- you could pass a parameter that another script is looking for and then post a message. just seems like a lot of unnessary scripting.
Hello,
Thanks for your answer. I am trying to trigger an userscript event (afterSubmit on Vendor Bill). I cannot do that in the first afterSubmit event.
For your other suggestion, could you give me more details ?
Regards,
Loïc
- so you are making an aftersubmit user event that should trigger a suitelet to trigger another userevent? why not move the code from the 2. user event to the first?
- you can have an onload script (the one displaying the message) listning for a specific url parameter that you are passing from your suitlet.