i have a requirement that to remove the problem task tab in problem record in SOW

satish244
Tera Contributor

i have a requirement that to remove the problem task tab (hide/remove) in problem record in SOW, also need to add the problem task under the related records, provided the images for reference

Screenshot 2026-04-15 155602.png

Screenshot 2026-04-15 155517.png

  

. 

2 ACCEPTED SOLUTIONS

Rakesh_M
Tera Guru

Hi @satish244 ,
1.Open UI Builder (All >>>UI Builder)
2.Click on Page Collections
3.Search SOW - Record tabs middle
4.Select settings of "
Problem Task Related List SNC
Screenshot 2026-04-15 at 4.44.30 PM.png
5.Now uncheck availability and save.
Screenshot 2026-04-15 at 4.48.36 PM.png

Note:This removes Problem Tasks Tab from All workspaces

View solution in original post

@satish244 

Navigate to Now experience framework -> Related list actions

Deactivate this action

Shruti_0-1776326178840.png

 

Create a new action assignment with these field values in Problem Management for Service Operations Workspace scope

Shruti_1-1776326230032.png

 

View solution in original post

8 REPLIES 8

Rakesh_M
Tera Guru

Hi @satish244 ,
1.Open UI Builder (All >>>UI Builder)
2.Click on Page Collections
3.Search SOW - Record tabs middle
4.Select settings of "
Problem Task Related List SNC
Screenshot 2026-04-15 at 4.44.30 PM.png
5.Now uncheck availability and save.
Screenshot 2026-04-15 at 4.48.36 PM.png

Note:This removes Problem Tasks Tab from All workspaces

Shruti
Giga Sage

Hi 

To hide Problem task tab

Navigate to Page collections in UI builder -> SOW - Record tabs middle -> Deactivate problem task related list SNC

 

 

To add it to the related records tab

1. Create a script include in Problem Management for Service Operations Workspace scope

Name - SOWProblemRouteUtilCustom

Script - 

var SOWProblemRouteUtilCustom = Class.create();
SOWProblemRouteUtilCustom.prototype = Object.extendsObject(sn_sow.SOWDefaultRecordRouteUtil, {
    initialize: function() {},

    getOtherRoutes: function(table, sysId) {
        if (sysId != "-1") {
            this.RESULT.relatedListRoutes.push({
                "route": "related_list_collection",
                "fields": {
                    "show": true,
                    "relatedListTabName": "fix_tasks"
                },
                "label": gs.getMessage("Fix Tasks"),
                "options": {}
            });
        }
        return;
    },

    getListsForRelatedListTab: function(relatedLists, table, tabName) {
        if (!relatedLists)
            return;
        var improvementIntiativesList = "REL:55cc7d9e73131300ed1831ff2ef6a7c9";
        var excludeLists = [],
            lists = [];
        var fixTasks = gs.getProperty("problem.fix.records", "change_request.parent,rm_defect.parent,rm_release.parent,rm_enhancement.parent,sn_cim_register.source_id");
        if (fixTasks.includes("sn_cim_register.source_id")) {
            fixTasks = fixTasks.replace("sn_cim_register.source_id", improvementIntiativesList);
        }
        fixTasks = fixTasks.split(",");
        var fixTaskLists = [];
        if (fixTasks.length > 0) {
            fixTaskLists = relatedLists.filter(function(rl) {
                return fixTasks.indexOf(rl.value) > -1;
            });
            // Adding these to the exclude list so that they do not repeat on the related_list tab
            for (var i = 0; i < fixTaskLists.length; i++) {
                excludeLists.push(fixTaskLists[i].value);
            }
        }

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

        return lists;
    },

    getRelatedListConfig: function(table, sysId) {
        var excludeLists = [];
        var result = {};
        var improvementIntiativesList = "REL:55cc7d9e73131300ed1831ff2ef6a7c9";
        var fixTasks = gs.getProperty("problem.fix.records", "change_request.parent,rm_defect.parent,rm_release.parent,rm_enhancement.parent,sn_cim_register.source_id");
        if (fixTasks.includes("sn_cim_register.source_id")) {
            fixTasks = fixTasks.replace("sn_cim_register.source_id", improvementIntiativesList);
        }
        fixTasks = fixTasks.split(",");

        for (var i = 0; i < fixTasks.length; i++) {
            excludeLists.push(fixTasks[i]);
        }

        var relatedRecordTab = this.RELATED_RECORD_TAB;
        relatedRecordTab["exclusionList"] = excludeLists;

        result = [{
            "label": gs.getMessage("Fix Tasks"),
            "id": "sow_problem_fix_task",
            "exclusionList": null,
            "inclusionList": fixTasks
        }];
        result.push(relatedRecordTab);
        return result;
    },

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


    getCreateRelatedListUrlByTableName: function(problemSysId, tableName, fieldsToCopy) {
        if (gs.nil(problemSysId) || gs.nil(tableName))
            return;
        var problemGr = new GlideRecordSecure('problem');
        if (gs.nil(problemGr))
            return;
        problemGr.get(problemSysId);
        if (!problemGr.isValidRecord())
            return;

        var url = tableName + '.do?sys_id=-1&sysparm_query=';

        if (!gs.nil(fieldsToCopy)) {
            var defectGr = new GlideRecordSecure(tableName);
            defectGr.initialize();
            var fieldsArr = fieldsToCopy.trim().split(',');
            for (var i = 0; i < fieldsArr.length; i++) {
                if (gs.nil(fieldsArr[i])) continue;
                if (defectGr.isValidField(fieldsArr[i]) && problemGr.isValidField(fieldsArr[i]))
                    url += '^' + fieldsArr[i] + '=' + problemGr.getValue(fieldsArr[i]);
            }
        }
        url += '^parent=' + problemSysId;
        return url;
    },
    type: 'SOWProblemRouteUtilCustom'
});
 
 
2. Navigate to sys_extension_instance.LIST
Create a new record 
Shruti_0-1776253800164.png

 

Thank you @Shruti  , i have tried in PDI, working as expected, but my issue is user not able to create a problem task from SOW, since we have not activated a plugin for some regions (so problem model type is missing to select). but we can create a problem task from legacy view not in SOW(attached the screensort which have issue), here requirement is need the same functionality how we creating in legacy view. 

@satish244  Can you share the screenshots of task creation in legacy view?