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.

After deleting the attachment its still stored into the sys_attachment table

Sovan
Tera Contributor

We have created a custom attachment field for our record producer. When user is going to create a record with an attachment, before submitting the record first they attach the attachment and then they deleted that and again they attached a new one. 

However that deleted attachment has been stored into the sys_attachment table with prefix ZZ_YY and the new attachment has been stored properly.

 

We need to remove that deleted attachment (prefix ZZ_YY) from the sys_attachment table while submitting the record with the new attachment.

Please help to solve this.

15 REPLIES 15

Still no luck.

 

Can you please take a look of my requirement and then help?

Before submitting the record I attached the attachment to the custom attachment field, after that I deleted that and again attach a new attachment and then submit the record.

However that deleted attachment is still storing into the sys_attachment table with ZZ_YY prefix.

 

How I can delete that attachment when I click delete from the custom attachment field before submitting the record?