- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2016 02:04 PM
Hi all,
New to ServiceNow, and am in the set up and configuration stage. Here is what we would like to do:
On the Incident form, we would like Business Service to be populated, based off the Configuration Item that is selected. This would
only apply wherever there is a relationship between the CI and a Business Service (we have all of our Applications and some other CI types
related to a Business Service. The relation ship is usually Business Service depends on CI).
From researching I see this is probably possible using business rules with a script or with some use of dot-walking or both. Anyone have a
suggestion here?
Much appreciated,
Steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2017 11:54 AM
Hi Steve - you could use the combination of a Dynamic Reference Qualifier + Script Include, but here's a simpler solution:
- The Incident table already has Business service [business_service] field (inherited from the Task table). Add this field to the Incident form.
- Configure the Dictionary settings for the Business service field as below in the Reference Specification tab (you need to use the Dictionary's Advance view to see these fields):
Reference: Business Service
Use reference qualifier: Advanced
Reference qual: javascript:'sys_idIN' + new CIUtils().servicesAffectedByCI(current.cmdb_ci); - Save the Dictionary changes.
- Open a new or existing Incident form and test. In case a CI is not related to any Business Service, the list won't show anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2017 12:28 PM
Glad to be of help. Would you mark the reply as answer if appropriate? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2017 06:28 AM
I'd like to point out that we made the changes to a field in the Task table, which means all tables that extend from the Task table will inherit the settings (there are quite a few such tables, including Change, Problem, Request, etc.). In case you want the behavior confined to Incident only, you'll have to use a Dictionary Override.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2017 07:06 AM
Thanks John, we actually wanted that behavior so this worked out perfectly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2017 05:27 PM
Hi John
I am looking at something similar, though I want to select the Ci based on the Business Service.
I have the Business Service (u_business_service) and the Affected Ci (cmdb_ci), both extended from the task table.
Would the ref qualifier be something similar?
javascript:'CIUtils' + new sys_idIN().CIAffectedByService(current.u_business_service);
Though this clearly doesn't work.
Am I trying to be too simplistic?
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2017 05:54 PM
Hi Chris,
The CIUtils class doesn't have a built-in method for CIAffectedByService, so you'll have to create your own. One challenge here is there may be a lot more CIs for a service than the other way around, so you may run into performance issues if you're doing this in real time. You can lessen the impact by specifying which class/type of CIs to return or limit to only so many generations of descendants to search.
Hope this helps.
John