How to update the ownership of the item for employee who left the organization

Prathamesh Cha1
Tera Contributor

Hi Team,

 

A VP left company and there are Issues and other objects that are owned by this user. A new VP replaced the user.

Now these objects are still owned by the user who left.

Hence I need to identify these objects and update them through a script.

Expected outcome : Update ownership of items owned by old owner to new owner.

We need to identify objects owned by “Old VP” and update the ownership of those items to “New VP”.

Fix script will be needed but how to identify objects and replace them?

 

Thanks

2 REPLIES 2

Phil Swann
Tera Guru
Tera Guru

This is not really a topic specific to GRC, moreover it is prevalent in the world of business - and thus present across the entire ServiceNow platform. ServiceNow is ripe and ready to support the resolution of it too!

 

The difference between GRC and 'the rest' , is perhaps, that a lot of the work in GRC may not all be task based. e.g. you would potentially have Controls or Risks, which extend from sn_grc_item , not task. 

Thankfully - the ownership is typically sync'd with the Entity , and hopefully you have that derived and sync'd based on the applies_to source record, which takes the solution.

To identify target records, you can filter on sn_grc_item where owner IS , OR , respondents CONTAINS <old_user>

 

You many want to look at asmt_assessment_instance user field too, for attestations. 

Other records related like Policy from sn_grc_document has ownership and reviewers (can really get stuck here!)

Other aspects such a Risk Statements for risk appetite 

 

Be mindful of each record's lifecycle. Don't try to rewrite history, only active + outstanding. 

 

For the rest, task based, just filter on task table directly using assigned_to but MAKE SURE you filter on ACTIVE=true. 

Of course, there are some other fields on these tables which is not simply assigned_to , such as on sn_grc_issue you have the issue_manager 

 

Suggest you use a data management job rather than a fix script. and TEST in subprod first! 

 

If you must, you can always go to the sys_dictionary and list all fields that reference sys_user , and then filter on each table against those, if you really need to dust behind the TV... 

Hi @Phil Swann ,

 

can you please elaborate and tell what action exactly do I need to perform?, like glide on which table and query anything like that?

 

thanks