Weird one today, hoping someone has encountered th...
# suiteflow
j
Weird one today, hoping someone has encountered this before. I have a Workflow that runs on Create or Copy of Transaction. It does a few things in beforeload/beforesubmit, then has one custom WF action called in After Submit. My custom action is NOT being called when an Invoice is created with ‘to be emailed’ ticked….. if ‘to be emailed’ is NOT ticked, it is called. What the heck is going on here?
it’s as though the act of emailing the transaction is bumping it out of the workflow prematurely or something.
message has been deleted
c
Agreed, looks like the AfterSubmit trigger is skipped in favor of the Email's BeforeLoad. Not sure what to do about that though.
@jen thought about this more. when does your workflow exit? in other words, does the transaction leave the workflow after the email is created and so it never gets back around to an AfterSubmit trigger? could you create a copy of the AfterSubmit WF action which is set to run on a different trigger, or via a separate WF on a schedule (to clean up ones that are emailed)?
j
The email action is not part of the workflow though. It just happens automatically when you have an Invoice set to “tobeemailed” that NetSuite natively emails it to the selected person
c
Sure, but what I mean is if the native NS emailing function "displaces" the normal AfterSubmit trigger on create, you can't do anything to change that other than submit a Support ticket and wait. But if your workflow is a "once-and-through" meaning it fires on create/copy only and exits after finishing, then you may be missing a "second chance" to catch that record and finish the remaining actions. You may have to have a different version of the action you want to execute on AfterSubmit, f.ex one that runs on the BeforeLoad that comes after creation is finished in the UI, or in a separate workflow which only fires on schedule using a saved search list of records which have "tobeemailed" checked and haven't been through whatever you wanted your AfterSubmit trigger to do. These are just examples and it would depend on exactly what you're trying to do and other context you cut from your ask for length.
a
Maybe try an after submit transition to a new state and put your custom action on entry in the new state?