Business rule to filter out attachments that are added to the target record

marketa_w
Tera Expert

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

marketa_w_0-1729603459529.png

 

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.

 

3 REPLIES 3

sejal1107
Tera Guru

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

 

Please check and Mark Helpful and Correct if it really helped you.
Thanks & Regards
Sejal Chavan

Hi Sejal,

 

 I tried to set it as a before insert but unfortunately  no difference. 

sejal1107
Tera Guru

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

 

Please check and Mark Helpful and Correct if it really helped you.
Thanks & Regards
Sejal Chavan