- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2019 02:57 AM
displaying if an incident has a problem record attached then incident's related list tab called " problem " should display the problem record automatically , please a advice how to achieve this ..awaiting response .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2019 05:43 AM
Hi Roopashree,
Is problem_id field on incident populated with the problem record?
If yes then only the related list will show that problem record; if not then it won't show since query is based on that field
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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-12-2019 03:12 AM
Hi Roopashree,
system definitions --> relationship
Now click on the New Button and write the code as shown here in the screenshot. This will fetch the related problem records in incident table.
Now Navigate to the Incident --> Configure --> form layout.
Now select the "PROBLEM" tab you have created and you can search for the Relationship you have created in your previous step and add it under the problem tab.
Now save it and you can see that related records will be displayed for the related CI.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2019 03:12 AM
Hi,
on problem form related list can be added by configure related list since incident has a problem_id field which refers to problem
Is the relationship defined for this ? if not then you need to create a relationship between those 2 tables
1) in left navigation type relationships under system definition
2) click new -> give name you want Problem for Incident
3) applies to table -> incident
queries from table -> problem
script as below
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
// parent refers to record on which related list to be shown
current.addQuery('sys_id', parent.problem_id);
})(current, parent);
screenshot below
now go to incident form; configure related list; search for the related list with the name given in step 3 and add click save
If there is a problem associated to this incident record it will show up then
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
06-11-2021 06:19 AM
Perfect..!!! It working ..
Thank you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 06:35 AM
Glad to help.
Please mark response helpful.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader