i have a requirement in which in a flow i am attaching a PDF file to a case with attach smart shape and after that smart shape i am sending an email with the attached PDF but the email is not having the PDF as attachment.i guess the reason is the attachment is not getting commited to data base .But if i explicitly give commit then the lock will get released.
kindly give me a soln so that i can send the email with attached PDF as an attachment.
***Edited by Moderator: Pooja Gadige to add platform capability tag***
@PraveenP7456 There can be lot of possible solution. You can create custom activity which sends the email with attachment. You can specify attachment page for sending the pdf attachment in the email sending.
You can think of adding a wait shape (Not sure of the flow and how it works for you) for 1 sec, that will commit everything and then you can send the email.
You can think of using write now, in that case you should not loose lock of the work object.
Posted: 1 year ago
Posted: 24 Feb 2021 3:32 EST
Praveen P (PraveenP7456)
@Saikat_Chakrabortty Hi Sai thanks for the reply in my scenario the issue is like the attachment is not getting commited to the WO.As a result the activity i used to send email is not fetching the attachment.Even if i add wait shape will the commit happen? and using wrote now will throw severe warning.
Posted: 1 year ago
Posted: 27 Feb 2021 0:54 EST
Saikat Chakrabortty (Saikat_Chakrabortty)
1. As part of assignment processing if a user is attaching the file using file control, as soon as the Attachment model dialogue is submitted file will be attached to the case. Once the assignment is submitted use Send email smart shape with Include Case Attachments check box checked. Here there will be the privilege of selecting all attachments or specific attachments of the case. Once the smart shape is executed then an E-mail will be sent with attachments.
2. If the attachment is not getting committed automatically, in the post-processing actions after the attachment is added and submitted write an activity that will save the attachment content to the Attachments table and link the attachment to the work object and save it then use either SendEmailWithAllAttachments OOTB activity or smart shape to send an email with attachments. It will work.