How to get all parent services recursively using script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 11:12 PM
Hi All,
I am looking for a recursive script to get all the parent business services, here is my requirement there is sla definition on the business services, when we select that business services on incident form that particular sla will get attached to the incident. In the same way for one business service there will be parent services and child services.
Lets assume there are business services as Test, test-1, test-2, test-3, test-4. Where Test is parent for test-1 and test-1 is parent for test-2 and test-2 is parent for test-3 and test-3 is parent for test-4. If I am taking test-4 (doesn't have sla) business service in incident form, script has to check whether the parent test-3 has sla or not, if yes attach that sla to the incident, if not check for test-2...go on until 1st parent level(that is Test) irrespective of the levels it should check it could be 5 or 10 levels.
How can we do that?
Please assist.
Thanks,
K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 11:16 PM
Hi,
check following links and it should help you:
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
03-03-2022 07:32 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
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
03-09-2022 04:33 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader