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

Thanks Darius! The link between the CI and Business Service is just the relationship, which I think means it is part of the BSM map. So I might have to go the script route. I appreciate your help and feedback.



Steve


drjohnchun
Tera Guru

ServiceNow comes with a UI Action called "Refresh Impacted Services" that's tied to Change Request. You can copy it and use it with Incident as well. When you run it, it populates the Impacted Services [task_cmdb_ci_service] table with the Impacted Services, which you can display as a Related List. If there's always only one CI for an Incident, then this may work for you.



If you have more than one CI for an Incident, then you can modify Refresh Impacted Services to iterate over all CIs in the CIs Affected [task_ci] table or you can read Walking the ServiceNow CMDB Relationship Tree - ServiceNow Guru for other solutions.



You may also want to look at Task outage / Using Task Outage - ServiceNow Wiki



Hope this helps.



Please feel free to connect, follow, mark helpful / answer, like, endorse.


John Chun, PhD PMP see John's LinkedIn profile

visit snowaid


ServiceNow Advocate

Winner of November 2016 Members' Choice Award


Hi John,



Having gotten along further in our implementation, we are now taking a slightly different approach. Some of our CIs now have one to many relationships with Business Services. We would like to have a CI populated, and then the Business Service field would only allow those Business Services associated with that CI to be selected, either via the magnifying glass picker or by type ahead. I think this can be done with a dynamic reference qualifier and a script include. Would you know how to implement this?



Thanks,



Steve


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


John, you are the man, it worked! Thanks so much for your help! This is a key step in our implementation and I really appreciate your assistance.



Steve