How to set "Assigned to" field to empty in asset table when a employee state is Terminated

nishtha6
Tera Contributor

Hi,

Can someone tell be how to set Assigned to field to Empty if a user is terminated.

This i am asking to do in Asset table.

Basically, User left the company and he has so many assets assigned. The client need that we need to remove all the Assets from the user in servicenow Asset table when user record is terminated.

9 REPLIES 9

HI,

instead of clearValue use grCI.setValue('assigned_to','');

 

Thanks,
Ashutosh

akash_mehta
ServiceNow Employee
ServiceNow Employee

Just from a process perspective - where are those assets?  If the user has left the company or transitioned from the company; at that point the asset should have been picked up and the asset updated via that process?  If it was missed; maybe the process should be to update the assigned to to the manager of the old assigned to.

Just a thought prior to just clearing out that value.

-Akash

Daniel Slocum
ServiceNow Employee
ServiceNow Employee

Hi nishtha,

While the scripting to complete this update is rather straight forward, you really should speak to the process as @akash.mehta pointed out in his reply. The process of collecting the assets as the user is escorted from the premises should include an update step to the asset records.  If your customer creates a task to a Security Team or possibly to the employee's manager, then when that task is marked "closed complete" the update script could fire to remove the assigned to value of the list of assets related to the task.  If you simply update the assets upon the user record being marked as terminated, the user's assets could easily walk out the door with the user since there will no longer be a way to identify which asset the user was responsible for.

I encourage you to not just create functionality for your customer in ServiceNow but also provide strong consulting value and encourage the customer to consider process as well. 

Daniel

Hi Daniel,

Thank a lot!

So we have a request item for termination, if want that once the request item is close complete, then want the asset -> assigned t field to empty.

According to them they want us to write a script in workflow which will automatically set asset-> assigned to field to empty. 

 

could you plz help now on this?

nishtha6
Tera Contributor

Thank a lot!

So we have a request item for termination, if want that once the request item is close complete, then want the asset -> assigned t field to empty.

According to them they want us to write a script in workflow which will automatically set asset-> assigned to field to empty. 

 

could you plz help now on this?