Has anyone had success attaching a non-related tra...
# administration
e
Has anyone had success attaching a non-related transaction through an email workflow? I need to attach a sales order to an email workflow that runs off the item receipt
k
You'd have to use a workflow action script to do this.
can't be done with a standard workflow
e
@KevinJ of Kansas hmmm. What would the script be doing here forcing the printed form to switch to the SO?
k
It'd have to be responsible for generating the PDF and sending it in an email.
it'd replace the "send email" action with your own custom action
e
Well the generation of the PDF here is working and it's fine it's just the incorrect txn type.
k
But you can't generate the SO from the IF is what I'm telling you - a custom script would have to be written to do that.
e
Gotcha. Thanks
k
a workflow can only run on the record it is operating on.
you can bend the rules of that by writing a workflow action script - but it has to do everything that you would normally come from the standard action
meaning in this case - generating the PDF and attaching it to an email and designating recipients subject etc.
e
The only other solution here is to put the SO PDFs into the file cabinet and have the script pull it from there and attach it
k
It's not a terribly complex script to write, but it does require understanding scripting.
It can utilize the existing templates for the SO. I wouldn't mess around with trying to get it to use a stored file
e
I can wear many hats, but scripting is not one of them 🤣
k
Right. I dabble.
Knowing what I know - I'd probably beat my head against it for a day or two. Someone more experienced scripting can probably write it faster.
e
Yeah it's going to my dev team. I spent about 3 hours trying to force it through on the back end through link changes, freemarker and other work arounds. I've lost the patience lol.