How to delete attachment in Incident from one Instance to another.

Priya Gautum
Kilo Guru

Hi Team

How can we delete the attachment in Incident from instance to another using Rest?

Regards,

Priya

5 REPLIES 5

Knight Rider
Mega Guru

Hi,

Please refer to the below video:

 

https://community.servicenow.com/community?id=community_article&sys_id=e0dc2665dbd0dbc01dcaf3231f961983

Product Documentation:

https://developer.servicenow.com/app.do#!/rest_api_doc?v=newyork&id=r_AttachmentAPI-DELETE

Let me know if you have any questions!!

Thanks,

-Vinay.

 

Akshata jamdar
Mega Guru

Hi,

 

You can refer below article link it might help you,

https://community.servicenow.com/community?id=community_article&sys_id=e0dc2665dbd0dbc01dcaf3231f961...

 

Please amrk the answer correct and helpful if it will helps you.

 

Regards,

Akshata

harishdasari
Tera Guru

Hi Priya,

OOB we have a way to do it. Here is the document which can help you to delete the attachment.

https://docs.servicenow.com/bundle/newyork-application-development/page/integrate/inbound-rest/conce...

Create the scripted web service and you can delete the attachment using the sys_id in target instance.

In the script section of the scripted web service, you can query the incident table and check for the attachment sys_id to delete the attachment.

Thank you.

Hi Harishdasari, 
Can you give me more details about that scripted web service? i wonder that how you can store the response body (attachment sys_id, table_sys_id of the sys_attachment table) after Post that attachment to target instance.