Date should capture when the incident is resolved

manisha3014
Kilo Contributor

Hi   All....on incident form i have to create a new field called "Last Resolved' on the Incident page which should capture the date when the Incident was last marked as resolved. Please help me in this.

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

Hi Manisha,



one quick question.


why do you need to capture the date in your last resolved field.


there is OOTB field "closed" you can use that field also to update the exact resolved time of your incident.


just you need to mention the condition in business rule.



current.closed_at = gs.nowDateTime();


below screenshot for your Resolved At field.



find_real_file.png


View solution in original post

25 REPLIES 25

Karthik Reddy T
Kilo Sage

Hello Manisha,



You can write BR for this scenario.



In the action tab field last resolved as closed date.


Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.

Harsh Vardhan
Giga Patron

Hi Manisha,



create before business rule and put the condition current.state=='resolved'



put the script.



current.u_last_resolved= gs.nowDateTime();


Hi Harsh Vardhan,



Thank you so much for help. I have a doubt current.state=='resolved' where i should i mention in filter condition or in the script i have to. can you please help me.


if you see m screenshot i mention it in condition field in scrip section.



please also check what is the value of resolved?