The CreatorCon Call for Content is officially open! Get started here.

'Data Policy Exception' - User cancelling their own incident on the portal

steveturley
Tera Guru

Hi.

 

I've found this code for a widget that allows a user to resolve, cancel or chase their incident on the portal - Ticket Actions Widget — ServiceNow Elite

 

It all works great except for when trying to cancel their incident they get a 'Data Policy Exception: The following fields are mandatory: Change Request' message

 

This seems odd as 'Change Request' isn't really linked to Incidents. I've looked at all the Data Policies for Incident and none refer to cancelled incidents or 'change request' in the rules.

 

Any ideas? Thanks!

1 ACCEPTED SOLUTION

steveturley
Tera Guru

So, it turns out there a 'Debug Data Policies' facility. Using that I could see which Data Policy is being triggered, and for some reason that code is moving the incident to a state which is 'Awaiting Change' and thus triggers a Data Policy which requires a Change Request number.

View solution in original post

2 REPLIES 2

Mark Manders
Mega Patron

Do you have any data policies related to anything that has to do with change requests? Something is being changed with the canceling, that is triggering this data policy. 

You can trouble shoot by inactivating all of them and activating them one by one, to see which one gives the issue.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

steveturley
Tera Guru

So, it turns out there a 'Debug Data Policies' facility. Using that I could see which Data Policy is being triggered, and for some reason that code is moving the incident to a state which is 'Awaiting Change' and thus triggers a Data Policy which requires a Change Request number.