Need to write a script for cascade deletion, Engagement records should be deleted when vendor delete

bejawada
Tera Contributor

Hi Community,

 

I have a requirement to provide an option of Delete button on Vendor Records for Vendor Manager role.

Whenever the delete button clicks associated Engagements should also get deleted. The delete functionality should be available on Vendor Management workspace.

Please help me in writing script for workspace delete button.

 

Thanks.

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @bejawada 

you don't need to script anything. just make sure that the respective cascade delete rules are set correctly. Then ServiceNow will delete referencing records automatically in case the parent records gets deleted.

See https://docs.servicenow.com/en-US/bundle/vancouver-platform-administration/page/administer/field-adm...

Maik

View solution in original post

10 REPLIES 10

Appreciate your time.

I think all the PDI's will behave same if we follow the above steps. I would request you to give a try in your PDI, so that you will get the same issue over there as well.

Please let me know if you have any questions.