Incident State not updated

Community Alums
Not applicable

Hi guys,

 

Since when the below BR does not work anymore:

+ Before - Update

+ Condition: State is In Progress (or any state)

+ Script: current.state = '1' (or any state)

 

=> This will only update the State NOT the Incident state, that's why it's not captured in the Activity, even in PDI no matter it's in Vancouver or Washington or Xavandu.

=> In the right situation, the OOTB 'Copy State to Incident State' should trigger but did not, only manually update will trigger this BR.

 

I checked my instance records and it worked last May this year but not now. Anyone know why?

1 ACCEPTED SOLUTION

Runjay Patel
Giga Sage

Hi @Community Alums ,

 

You are right,  fields updated by BR will not trigger filed change event. hence 'Copy State to Incident State' wont execute.

 

If you can check one OOB BR "Incident State Change to In Progress", this BR setting state and incident state both.

 

Resolution: You need to set state and incident state both, also do not write code, just do the filed mapping like below.

RunjayPatel_0-1730352372229.png

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

 

 

 

 

View solution in original post

2 REPLIES 2

Runjay Patel
Giga Sage

Hi @Community Alums ,

 

You are right,  fields updated by BR will not trigger filed change event. hence 'Copy State to Incident State' wont execute.

 

If you can check one OOB BR "Incident State Change to In Progress", this BR setting state and incident state both.

 

Resolution: You need to set state and incident state both, also do not write code, just do the filed mapping like below.

RunjayPatel_0-1730352372229.png

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

 

 

 

 

Community Alums
Not applicable

Hi @Runjay Patel ,

 

My original BR actually contains a lot more code and update the state at the end that's why I put it in the script.

But I figured it out now, this BR was originally built by s.o with current.update() at the end few years ago and it worked for both state fields.

This June I found this will cause duplicate action because we are using before BR so I removed this line of code which prevent the Incident State to be updated.

So the solution now is just add the current.incident_state will solve the issue :). Anw thank you!