- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 11:58 AM
Hello All,
I have created a custom visualization in this "overview" page of the Service operation workspace by editing this script - SowIncidentLandingPageUtils as shown in the ServiceNow documents.
With this, I can get the below design.
but you see when I click on this 20 under "My team incident aging", the below-related records displayed as "Unassigned incidents" ( refer to green circles). while I checking this I saw there is another script including SowIncidentLandingPageUtilsSNC that has this configuration, but not sure how to edit this. I tried by duplicating this entire script utils but when it is not working. how to edit this alternatively.
any help will be highly appreciatable.
PaulSylo
Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 09:13 PM
Hi @PaulSylo
with super.getLabelMaps(<PARAMETERS>) you will receive the values from the OOTB implementation in SowIncidentLandingPageUtilsSNC. And then you have to decide whether you want to pass that without any changes to the caller of SowIncidentLandingPageUtils.getLabelMap() (makes no sense) or change something or merge with whatever you have built in SowIncidentLandingPageUtils.getLabelMap(). I cannot explain better as the answer depends on what you want to achieve.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 07:51 PM
Hi @PaulSylo
whenever you see two script artifacts starting with the same name but one of them ending in "SNC" you can be sure that ServiceNow provides a pattern to allow overriding OOTB functionalities without changing OOTB artifacts.
The class SowIncidentLandingPageUtils is just a placeholder which is used by ServiceNow to invoke methods in SowIncidentLandingPageUtilsSNC unless the inheritance chain is interrupted by a customer.
In the most simple approach, you just copy the complete method getLabelMaps() from SowIncidentLandingPageUtilsSNC to SowIncidentLandingPageUtils and modify it to your needs.
The more sophisticated approach would be to also call the parent method with super.getLabelMaps(<PARAMETERS>) and merge the returned result with your customized version.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 09:08 PM
Thanks @Maik Skoddow - Thats insightful. I am trying to do the same, i have copied the getLabelMaps() from SowIncidentLandingPageUtilsSNC and applied SowIncidentLandingPageUtils , but looks like something is breaking the entire container. however, I will try to check step by step.
Can you explain, how to do this, "super.getLabelMaps(<PARAMETERS>) and merge the returned result with your customized version", it will be very helpful.
PaulSylo
Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 09:13 PM
Hi @PaulSylo
with super.getLabelMaps(<PARAMETERS>) you will receive the values from the OOTB implementation in SowIncidentLandingPageUtilsSNC. And then you have to decide whether you want to pass that without any changes to the caller of SowIncidentLandingPageUtils.getLabelMap() (makes no sense) or change something or merge with whatever you have built in SowIncidentLandingPageUtils.getLabelMap(). I cannot explain better as the answer depends on what you want to achieve.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 08:07 AM
Hi @PaulSylo ,
Please check this community article created on "how to customize landing page"
Please mark it helpful if it answers your query.
Thanks,
Haseeb Ahmed