Help with a business rule script on the sys_email table for client scripts to indicate attachments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2023 01:46 PM
Hello - I am working on a way to identify which attachment(s), if any were included on an outbound email utilizing the Email Client functionality in a scoped application. I searched around on community and found a script that is exactly what I am looking for and it is working:
My problem is that when there are not any attachments included, it is still adding the "Attachment(s) included in this email:", which I understand why because the variable is declared at the top and is included in the 'body' update regardless, as it is outside of the query loop. I am wondering how I can just have the 'attachment' variable only utilized if there is actually an attachment. I am sure I am missing something easy, looking for any assistance, thanks in advance!!