I’m having an issue with returning the reportResult object from server and interpreting its name. I generated 2 different reports and had them emailed to myself. The attachment names were Roster_4145ae112a1aaa67fda89c1e7f93b402.pdf and Roster_463e918212c67f42843cf9ad0ea5fc8b.pdf.
When opening them in Preview, they were both the same Roster PDF. I will debug this myself, but the main question is How do I replace the cryptic name with “Roster_” + study group name? To do this, I need to know the field names in the reportResult object returned by the server-side generation. I can find no documentation on that object. Can you tell me if there is a report name field as part of that? can you supply an object model for that?
Or, failing that, can you tell me how to assign a name to the attachment before attaching it to the email?
I suggest you use five’s variable to send the study group name to the function DoAddAttachments. Then, in the function you can retrieve this variable and format the file name.
Note:
You cannot pass any extra value in the context to this function DoAddAttachments because the event (Do Merge Record) is restricted.
Example of what you can do:
Set the variable before calling Email action.
Clear the variable after calling the action