Resolve action in emplyee center
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 10:18 PM
Hello everyone
When I click to resolve an incident from the portal, I should fill in the assigned_to field as a mandatory field.
How can the field be made non-mandatory?
Currently, as this is a required field, the incident cannot be resolved from within the portal by the end user.
I need that if the field assigned_to is empty it will become optional and not mandatory before the incident is resolved.
Resolution code
will be "Resolved by caller".
I would love to know how to do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 10:47 PM
Hi Yaron,
1. Log in to your ServiceNow instance.
2. Use the filter navigator to go to System Definition > Business Rule.
3. Find and open the business rule that makes the `assigned_to` field mandatory when resolving an incident.
1. In the business rule, navigate to the Script
2. Add a condition to the script to check if the resolution code is "Resolved by caller". If it is, the `assigned_to` field should not be mandatory.
Here is an example of how you might modify the script:
// Check if the incident is being resolved
if (current.state == 'Resolved') {
// Check if the resolution code is not "Resolved by caller"
if (current.u_resolution_code != 'Resolved by caller') {
// If 'assigned_to' is empty, show an error message and abort the action
if (!current.assigned_to) {
gs.addErrorMessage('The Assigned To field is mandatory.');
current.setAbortAction(true);
}
}
}
```
In this script:
- `current.state == 'Resolved'` checks if the incident is being resolved.
- `current.u_resolution_code != 'Resolved by caller'` checks if the resolution code is not "Resolved by caller".
- If both conditions are true and `assigned_to` is empty, it shows an error message and aborts the action.
1. Save the changes to the business rule.
2. Create a test incident and try resolving it with the resolution code "Resolved by caller".
3. Verify that the `assigned_to` field is not mandatory in this case.
By following these steps, you should be able to make the `assigned_to` field optional in ServiceNow when the resolution code is "Resolved by caller", allowing users to resolve incidents from the portal without filling in this field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 10:59 PM
there seems a data policy which is blocking that
Did you check that?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader