Change state incorrect until window refresh

Russell Abbott
Kilo Sage

On my Change records, when I approve a Change, the State changes to 'New' on the window, until I either reload the browser window or right click and 'Reload Form', then it goes to the expected state of 'Authorize'. What might be causing this and how can I either get the correct state to show or reload the form on Approval step?

> Current state

find_real_file.png

> Approval is clicked

find_real_file.png

> Reload form

find_real_file.png

 

 

1 ACCEPTED SOLUTION

Lisa Oakes
Tera Expert

Hi, we saw the same issue last week.  Having raised a case with ServiceNow they have confirmed the following workaround:

Record watcher switches change request state to: New after approval rather than valid state: Scheduled for Change Model driven changes
KB1116263 - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1116263.

I understand it is permanently fixed in San Diego Patch 5 but have not tested it yet.

All the best.

View solution in original post

10 REPLIES 10

Anil Lande
Kilo Patron

Hi,

Approval is separate part and once change is approved it updates the state and other fields (if any) directly in database. In order to reflect these changes on form we need to reload form.

 

Are you performing approval on same form (change request form)? 

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

The approval appears in the related list at the bottom of the Change form so yes, i think should be the answer to your question

In that case user need to reload form to see updated values.

In general user is not always on change request, most of the time approver is different.

Also ServiceNow has OOB behavior to show field changes when someone update field value in database. 

find_real_file.png

It shows first change if any field value getting changes, and it does not display second change on same field.

After approval workflow may have proceed to next states like Access->New->Authorize.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

The problem here is that sometimes the users click 'save' not understanding why the state went back to 'New'.

 

I think i have it fixed,

I created an OnChange Client Script on the field 'State' with the following code. Is this going to cause any adverse effects?

So far when i go through the approval steps, the window refreshes and the expected state it shown!

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }

     location.reload();   
}