Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to modify a related list condition in Service Operations Workspace

Aditya Banka2
Tera Guru

Hello Geeks, We have recently started configuring Service Operations Workspace in our instances and I was able to configure all the incident related list's in the SOW view as how it shows in the default view.

 

We have mentioned a filter under affected CI's and Impacted services in default view where we are displaying only the CI's which are not in retired state.

AdityaBanka2_1-1684325127937.png

 

 

Where as in SOW view, I don't see any filters and more over it's not displaying anything.

 

AdityaBanka2_2-1684325218701.png

 

When I checked in my PDI, I was able to see the CI's as below.

 

AdityaBanka2_3-1684325272419.png

 

 

Upon further investigation, I found below two under sys_declarative_action_assignment table.

 

AdityaBanka2_0-1684324921081.png

 

But I am not sure whether these are the actual Impacted Service MRA client actions that are being used to populate the related lists or not.

 

When I opened the client Action, the extension point shows as default and there is no query mentioned over there.

I compared the same with my PDI and it's the same. But there it is displaying the results.

 

AdityaBanka2_4-1684325598349.png

Please help me in understanding where we can find/configure the filter in SOW affected CI's/Impacted Services related list.

 

1 ACCEPTED SOLUTION

Hello rd063, I was able to resolve it.

 

In order to make it work, you need to modify/create few things.

 

1. Add a new extension instance under the extension point

 

https://yourinstance.service-now.com/sys_extension_point.do?sysparm_nostack=true&sys_id=78ae1f4f7707...

 

AdityaBanka2_0-1709213279546.png

 

AdityaBanka2_1-1709213352602.png

 

2. I named it as RelatedListAddAffectedCIFilter

 

code :

 

var RelatedListAddAffectedCIFilter = Class.create();
RelatedListAddAffectedCIFilter.prototype = {
    initialize: function() {},
    getFilterQuery: function(tableName, parentFieldName, parentRecordSysId, referencedFieldName) {
        var selectedRecord = new GlideRecord(tableName);
        selectedRecord.addQuery(parentFieldName, parentRecordSysId);
        selectedRecord.query();
        var result = [];
        while (selectedRecord.next()) {
            result.push(selectedRecord.getValue(referencedFieldName));
        }

        if (result.length)
            return "sys_idNOT IN" + result.join(",") + '^support_groupISNOTEMPTY^install_status!=7';

        return "support_groupISNOTEMPTY^install_status!=7";
    },

    handles: function(extensionPointKey) {
        return extensionPointKey == "ADD_AFFECTED_CI_FILTER";
    },
    type: 'RelatedListAddAffectedCIFilter'
};

 

It's a script include where you need to mention the condition and return the extensionpointkey. In my case I named it as ADD_AFFECTED_CI_FILTER

 

3. The newly created extensionpointkey should be used under the specific client action's action payload definition replacing the default with the one that we created.

 

AdityaBanka2_2-1709213653102.png

 

Please accept the solution and mark it as Helpful.

View solution in original post

4 REPLIES 4

rd063
Tera Contributor

Hi @Aditya Banka2 , Did you get the solution for it ? Could you please help me if you got the solution ?

Hello rd063, I was able to resolve it.

 

In order to make it work, you need to modify/create few things.

 

1. Add a new extension instance under the extension point

 

https://yourinstance.service-now.com/sys_extension_point.do?sysparm_nostack=true&sys_id=78ae1f4f7707...

 

AdityaBanka2_0-1709213279546.png

 

AdityaBanka2_1-1709213352602.png

 

2. I named it as RelatedListAddAffectedCIFilter

 

code :

 

var RelatedListAddAffectedCIFilter = Class.create();
RelatedListAddAffectedCIFilter.prototype = {
    initialize: function() {},
    getFilterQuery: function(tableName, parentFieldName, parentRecordSysId, referencedFieldName) {
        var selectedRecord = new GlideRecord(tableName);
        selectedRecord.addQuery(parentFieldName, parentRecordSysId);
        selectedRecord.query();
        var result = [];
        while (selectedRecord.next()) {
            result.push(selectedRecord.getValue(referencedFieldName));
        }

        if (result.length)
            return "sys_idNOT IN" + result.join(",") + '^support_groupISNOTEMPTY^install_status!=7';

        return "support_groupISNOTEMPTY^install_status!=7";
    },

    handles: function(extensionPointKey) {
        return extensionPointKey == "ADD_AFFECTED_CI_FILTER";
    },
    type: 'RelatedListAddAffectedCIFilter'
};

 

It's a script include where you need to mention the condition and return the extensionpointkey. In my case I named it as ADD_AFFECTED_CI_FILTER

 

3. The newly created extensionpointkey should be used under the specific client action's action payload definition replacing the default with the one that we created.

 

AdityaBanka2_2-1709213653102.png

 

Please accept the solution and mark it as Helpful.

You are a lifesaver

rd063
Tera Contributor

Thank you @Aditya Banka2