- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 11:04 PM
Hi,
I have a requirement where the user are able to close the incident from the list view without the closure notes and closure codes.
I need to make sure they should fill the close notes and close codes before resolving or closing the ticket.
I have tried different methods including data policy but it was not working. Finally I wrote an onCell edit client script which is as follows,
if(newValue == 6 || newValue ==7){
alert("Closure notes and Configuration Item are mandatory");
saveAndClose = false;
}else{
saveAndClose = true;
}
callback(saveAndClose);
Problem with this is like after inserting the close codes and close notes from list view still it is showing that alert.
Can anyone help me with the above code , where I can check if the close code and close notes are empty.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 12:50 AM
Hi Adarsh,
I have tried Data policy in my PDI & it is working fine. what condition are you adding in data policy?
For reference, check below screenshot.
Regards,
Harshal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 11:10 PM
Hi there,
You could expand your condition, checking if the close notes are filled. This would prevent showing the error over and over.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 11:53 PM
Can you please help me with the code!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 12:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2022 01:16 AM
Hi Harshal,
There is already a data policy available but it is kept inactive.
When it is turned active user are not able to create incidents.
I tried the same data policy it was not working