Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Service Operation Workspace - I want to move the related list one after the other (separate tabs)

Kiruthika J
Tera Contributor

Hi All,
I want to move the related list of interaction or all table from vertical to horizontal.

KiruthikaJ_0-1761564221578.png

I have gone through below community post but I'm not sure after going to  sn_sow_record.SOWRouteUtil and clicked create implementation and how to proceed further.

https://www.servicenow.com/community/next-experience-blog/service-operations-workspace-showing-relat...

Thank you !!



1 ACCEPTED SOLUTION

@Kiruthika J 

I was able to have this output.

I believe I provided an approach for you an you can play with this further.

It's just that the same related list is coming again within each tab

var SOWInteractionRouteUtil = Class.create();
SOWInteractionRouteUtil.prototype = {
    initialize: function() {},

    getRecordRoutes: function(table, sysId) {
        /* intentionally left blank */
    },

    getListsForRelatedListTab: function(relatedLists, table, tabName) {
        /* intentionally left blank */
        // if (!relatedLists)
        //     return;
        // var excludeLists = ["REL:e9343b6a873303002ae97e2526cb0b00"];
        // var lists = [];

        // if (tabName === 'related_list') {
        //     lists = relatedLists.filter(function(rl) {
        //         return excludeLists.indexOf(rl.value) === -1;
        //     });
        // }
        // return relatedLists;
    },

    getRelatedListConfig: function(table, sysId) {

        //Standard related lists tab configuration
        //var relatedRecordTab = RELATED_RECORD_TAB;

        //List of objects, each object is a separate tab
        var result = [{
                "label": gs.getMessage("Related Tasks"),
                "id": "related_tasks",
                "exclusionList": null,
                "inclusionList": ["REL:e9343b6a873303002ae97e2526cb0b00"] //Related lists to show on the tab
            },
            {
                "label": gs.getMessage("User's Interaction"),
                "id": "user_interaction",
                "exclusionList": null,
                "inclusionList": ["REL:e32c8b0353602110ad0fddeeff7b12ef"] //Related lists to show on the tab
            },
            {
                "label": gs.getMessage("User's Assets"),
                "id": "user_assets",
                "exclusionList": null,
                "inclusionList": ["REL:e32c8b0353602110ad0fddeeff7b12ef"] //Related lists to show on the tab
            },
            {
                "label": gs.getMessage("Interaction Related Records"),
                "id": "interaction_related_records",
                "exclusionList": null,
                "inclusionList": ["interaction_related_record.interaction"] //Related lists to show on the tab
            }
        ];
        // result.push(relatedRecordTab);

        return result;
    },

    handles: function(table, sysId) {
        return table === "interaction";
    },

    type: 'SOWInteractionRouteUtil'
};

AnkurBawiskar_0-1761650737290.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

13 REPLIES 13

@Kiruthika J 

I believe I have helped a lot and you can enhance and deep dive further.

Thank you for marking my response as helpful.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

ok thank you

@Kiruthika J 

please share final working logic so that it helps other members

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Kiruthika J Wy do you want to switch to this?

 

I would agree with @Ankur Bawiskar @Dr Atul G- LNG , it is best to drop this customization.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn