BR/Client Script to update Incident based on Asset State
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 05:40 AM
Hello,
I have a requirement for the following and would appreciate some help in achieving the result:
'Where the State of an Asset is anything but Missing, update the corresponding Incident as follows:
State on Incident ticket to be Closed
Close code - solved permanently
Closure sub cat - other
Close notes - closed by automation due to device state change'
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 05:55 AM
Hi @GMoon ,
You can write a before business rule with below code, just add your required field names along with what you want to display:
if(current.incident_state==30){
current.setDisplayValue('state','Work In Progress');
}
else if(current.incident_state==70){
current.setDisplayValue('state','Closed Complete');
}
else
current.setDisplayValue('state','Open');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 06:45 AM
Hi Sandeep
Thanks for the reply. Would that script also look at the State on the Asset? I can see it writing values to the Incident but not where it looks at the Asset field 🤔