- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-16-2024 05:22 AM
Hi
Below is My Requirement,
Can some one please hep
When user tries to add parent for an incident, it needs to check parent incident entered by user is child incident(it should be a child to any incident) or not
If it's child Incident Then it should update the parent incident and provide a message "child incident can't be parent incident" and it abort the action
If it's not child incident to any incident then parent incident column should get updated with given incident and also update the assignment group same as parent incident that user entered
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-16-2024 08:17 AM - edited ā04-18-2024 02:07 AM
You could just amend the reference qualifier on the parent incident field to:
This would prevent users from being able to select any incident that already has a parent incident. This would also work at from a list.
What you have asked for is possible but to make it work when the user selects the incident you would have to use a client script and a client callable script include. You could use a business rule to do the same thing but that wouldn't work until the user has submitted and could potentially waste the users time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-16-2024 08:17 AM - edited ā04-18-2024 02:07 AM
You could just amend the reference qualifier on the parent incident field to:
This would prevent users from being able to select any incident that already has a parent incident. This would also work at from a list.
What you have asked for is possible but to make it work when the user selects the incident you would have to use a client script and a client callable script include. You could use a business rule to do the same thing but that wouldn't work until the user has submitted and could potentially waste the users time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-16-2024 08:19 AM
You can do this with a UI Policy as below:
Then use the below script to check the Incident they are inputting:
function onCondition() {
g_form.getReference('parent_incident', function(gr){
if(gr.parent_incident != ''){
g_form.addErrorMessage('The incident is already a child of another incident ');
g_form.clearValue('parent_incident');
}
});
}
It would probably be more efficient to just modify the parent_incident field dictionary entry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-16-2024 08:23 AM
Good shout, didnt think about a UI Policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-17-2024 09:53 AM
Thanks for Response
but it's not working