To edit related records in Overview Tab

PaulSylo
Tera Sage
Tera Sage

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.

PaulSylo_2-1706299088401.png

 

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.

 

PaulSylo_1-1706299045301.png

 

any help will be highly appreciatable.

Regards,
PaulSylo

Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !
1 ACCEPTED SOLUTION

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

View solution in original post

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

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

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.

Regards,
PaulSylo

Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !

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

Haseeb-Ahmed
ServiceNow Employee
ServiceNow Employee

Hi @PaulSylo ,

Please check this community article created on "how to customize landing page"

https://www.servicenow.com/community/itsm-articles/configuration-activities-for-service-operations-w...

 

Please mark it helpful if it answers your query.

Thanks,
Haseeb Ahmed