https://netsuiteprofessionals.com logo
#suiteflow
Title
# suiteflow
r

rustyshackles

03/23/2022, 1:12 AM
Had to use a custom workflow action script for that requirement. The standard email action has no access to the record attachments
a

AI1

03/23/2022, 3:43 AM
@mattb If it's just 1 file you could source that into a custom field on the invoice. Then that custom field can be used to include attachments in the send email action. But if it's multiple file then it won't work without a custom WFA
m

mattb

03/23/2022, 4:01 AM
@AI1 woah, that’s an interesting though! yes it’s only ever one file. what if I want to send the transaction as an attachment (i.e. the transaction PDF) and the additional file, though? I think the workflow send email action only allows for the transaction or a custom field (as a file)?
a

AI1

03/23/2022, 5:38 AM
I think I've done both in the past. Let me check in the morning. I have a PO workflow that's sending the PO with attachment so I'm pretty sure it can do both
m

mattb

03/23/2022, 6:35 AM
i should also mention the attached pdf i am attempting to attach is unique per each transaction (invoice)
a

AI1

03/23/2022, 2:05 PM
Yes I am sending the invoice as a pdf AND a pdf attached file
Also you would just need to create a saved search that sources the internal ID of the file you want onto each Invoice record. So a transaction saved search that displays the internal ID of the files attached to each record. Then filter it to make sure it is selecting the correct file for each record. (In case there are multiples or weird files you dont want). And put a SUmmary of Max on the file.internalid field. Then put a filter of InternalID on the saved search. Then create a custom body field (Free Text) where store value is False and the saved search you made is the field source (Under validating and defaulting). Then make another custom body field (Type Document) and have a shceduled WF run that will set the custom body document field using the internal ID you set in the Free Text field. Then you can use that custom body document field as the attachment in your Send Email aciton.
Or you may even be able to use the same scheduled WF with the send email action just put the sourcing of your document field first, then send email after it in the list of actions, so when your WF runs it first sets the Document field, then sends the email using that document field as an attachment.
m

mattb

03/24/2022, 11:04 AM
@AI1 awesome thank you. my only drama so far is that in the workflow when setting the field value, the “current record” is showing the same field i’m attempting to set the value for
a

AI1

03/24/2022, 1:17 PM
You should have 2 fields. 1 is a document field and 1 is a text field that holds the internal id of the file when sourcing the document field you need to use a formula and the formula is your text field
m

mattb

03/25/2022, 8:06 AM
@AI1 nailed it! thank you! what a great use of a couple of fields and workflow
a

AI1

03/25/2022, 1:42 PM
Awesome!! Glad it worked
2 Views