How I can Cascade Delete record from background script?

Alok Sharma
Tera Contributor

How I can Cascade Delete record from background script?

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Alok,

Following links should help you:

http://www.john-james-andersen.com/blog/cascade-deleting-records.html

http://www.servicenowelite.com/blog/2014/2/14/deletion-methods

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

 

Thanks for sharing link. Could you please share the script for this. In link there is no script.

Hi Alok,

You need to determine which all tables are related to the table record you are deleting.

Query those as well and delete those records as well.

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Satyaki Bose1
ServiceNow Employee
ServiceNow Employee

Hi Alok,

The best solution I would suggest here to go through the article : 

https://community.servicenow.com/community?id=community_blog&sys_id=52cdbec6dbd57fc8d58ea345ca9619ea

 
Best regards,
Satyaki Bose
Technical Support Engineer - User Experience
servicenow | Works for you™