Populate Business Service Based on CI Selection

Steve Kelly
Mega Sage

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

1 ACCEPTED SOLUTION

Hi Steve - you could use the combination of a Dynamic Reference Qualifier + Script Include, but here's a simpler solution:



  1. The Incident table already has Business service [business_service] field (inherited from the Task table). Add this field to the Incident form.
  2. 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);
  3. Save the Dictionary changes.
  4. 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.


find_real_file.png


View solution in original post

24 REPLIES 24

darius_koohmare
ServiceNow Employee
ServiceNow Employee

One question I have: CI's to Business services are potentially in a one to many relationship. In your environment, are your Business services siloed so that the same CI does not appear in more than one service?


If not, you may need to consider using a related list or list type field to populate with N number of business service records.


Hi Darius,



Our Business Services are indeed siloed. One Business Service has many Application or Business Process CIs associated with it, however each Application or Business Process is only associated with one Business Service. So I think this should be fairly straightforward to implement with a script or something like that. Any ideas on how this could work?


Hello Darius,



Following up with you on this. Any assistance you could offer would be great.



Thanks,



Steve


Hi Steve,


What field on your configuration item links the CI to the business service? Make note of this field. In my example, I will pretend 'Domain' is that field.


Just make a business rule where:


1. table is incident. You run on insert or update. Conditions are Configuration Item.Domain [Is not empty] AND Configuration Item Changes.


Screen Shot 2017-01-04 at 1.52.22 PM.png


2. In the actions section, use the field builder. Select Business Service Same As Configuration Item.Domain


Screen Shot 2017-01-04 at 1.51.21 PM.png


Keep in mind: Domain is your Business Service field. To see the field.field options, make sure to select 'show related fields' at the bottom of the field list drop down.



If there's no field, and its simply part of a BSM map, it will require a script that would be based off CIUtils. Mentioned in this thread.