Set the CMDB CI record status to Retired from Workflow

SNOW46
Tera Contributor

Hello All,

We have a Catalog Item in ServiceNow designed where we have a variable named CI Name on the form which is reference to CMDB CI table to select the CI Name while submitting the request.

Now there is a requirement that whenever the catalog task is created and assigned to Asset Team, the short description of the CATALOG TASK should be set as Auto mark the device as retired in CMDB and the CI Record which is selected while submitting the REQ, that record Status should be changed to Retired and Catalog Task Status will set as Closed Complete.

Can anyone suggest me how to achieve this requirement as I need to update status on this on Monday.

Thanks

2 REPLIES 2

HugoFirst
Kilo Sage

Looks like you have a long weekend ahead of you.

If you are familiar with GlideRecord scripting you are in luck.  In the catalog task's script, add code to get the CI record and set its "installed_status" to 7 ( that's the value for retired ).  Then set the "hardware_status" to "retired".   Finally set the "operational_status" field to '2' ( for not operational ).  Then update the CI.

 

remember to set the task's state to '3' ( that's for closed complete ).

 

 

SNOW46
Tera Contributor

Hello,

I am not that much good in scripting and it will be great if you can help me out on the script to be written here.

 

Thanks