Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Attachment business rule trigger issue

Training
Tera Contributor

Hi,

I have after, insert business rule on sys_attachment table with trigger condition as table name is incident or enhancement.

It works perfectly fine when ticket is already created and then I add attachment to the ticket.

 

Issue- it does not work when I add attachment during ticket creation.

 

I tried by changing it to before but no success.

Please could you help.

 

1 REPLY 1

SanjivMeher
Mega Patron
Mega Patron

Can you try changing the BR to an async after BR and try?

Another way would be to use the attachment copy function...So a BR would be on incident table

GlideSysAttachment.copy('incident', current.getUniqueValue(), <target table name>, <target table sysid>);


Please mark this response as correct or helpful if it assisted you with your question.