- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2020 02:53 AM
Hello community,
I'm running into an issue, I have to import by using a transform map multiples records into [incident], it turned out some of them can't be created and the following message error appears "Data Policy Exception: The following fields are mandatory: Resolution code".
That said, I could expect this message because "Resolution code" is mandatory as soon as state is on "Resolved" and only tickets with this specific state couldn't achieve their way to the instance.
As far as I know, these two fields are part of the tab "Resolution Information" which lead me ask myself if they have to be mapped as I used to normally do but it seemed not.
Does anyone could help me?
Cheers
Antoine
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2020 02:59 AM
Hi,
it is because of this data policy which is OOB
Name: Make close info mandatory when resolved or closed
It is running on the Import Sets a well
If you want to skip this then uncheck that checkbox of
Apply to import sets - false
But remember from reporting point of view users will see empty resolution code and resolution notes for resolved incidents
Please set some default values from the field maps via the transform map
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2020 05:39 AM
you need to get the import set field which holds that value
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
var state = source.u_state; // use here the import set field which holds 6 or 7
if (state == 6 || state == 7) { // Resolved or Closed
target.close_code = 'Solved (Permently)';
target.close_notes = 'Closed from import set';
}
})(source, map, log, target);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader