Business rule to filter out attachments that are added to the target record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 06:28 AM
Hi all,
I am creating a business rule, that would prevent some types of attachments from attaching them to the target record.
The requirement is to filter out attachment that are smaller than 5kB and have certain file names. So we need to make a combination in the conditions.
The business rule is now set as you can see on the screenshot below with the 'Actions' > 'Abort Action' checked
The BR filters out correctly the names, but the issue is that is also filters out an attachment that has name e.g. image0088 but has size 1 MB - but this should be attached to the record.
Any idea why this is not working please?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 06:48 AM
Hi @marketa_w
Please create a before insert business rule and then set abort action true
If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers
Thanks,
Sejal
Thanks & Regards
Sejal Chavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 12:31 AM
Hi Sejal,
I tried to set it as a before insert but unfortunately no difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 06:23 AM
Hi @marketa_w
Can you try adding script in a business rule script
gs.log("BR is triggered");
current.setAbortAction(true);
Check in the system logs if you are getting the log "BR is triggered"
If not then conditions that you have mentioned are not met
Thanks & Regards
Sejal Chavan