Posted: 20 Aug 2019 15:43 EDT Last activity: 21 Aug 2019 13:39 EDT
File is not being attached to an email in the 1st execution of the case
I have a requirement asking me to create an email with a PDF file attached to it.
To do this, I've created an activity named SendEmailToTheClient with steps to create a corr-type, create a pdf file, using pxCreatePDF and a customized OOTB activity based on the SendEmailWithAllAttachment. As I need to send ONLY a single attachment within this main email, I customized this last activity to retrieve only the record that I need, using in the Object-Browser the following condition (the complete image of this step is attached): .pxLinkedRefTo Isequals Local.strRefKey
Somehow this is not working as expected. I can recover and send the email only in the 2nd execution of the application case. In the 1st one, the email is sent without the attachment.
Looking at the data page used as source for all of objects created to be used as attachments, (D_ATTACHMENTLIST), I can see the object that I want to attach to my email (using the same query condition), but it's not being attached when I am running my application case for the 1st time.
Do you guys have any idea for that?
Thanks in advance
***Edited by Moderator: Lochan to update platform capability tags***
The difference between these executions is that: In the 1st one I cannot retrieve the file recorded in the data page D_ATTACHMENTLIST (the resultset comes 0) but in the 2nd execution (within the same work case), the resultset comes 1 and the file is being attached to the main email correctly.
Hi MarcLasserre_GCS, I believe you're right. Also I added a Object-Save (with the option write now checked) just to force this commit but didn't work. As the 'issue' happens only within the 1st execution, I believe that, somehow, this could be happen because the transaction did not completed and the file is not not available at that time.. Like you said, just a thought