Need to remove Promote to Major incident options in the three dots in SOW as shown in the snio

gharish
Tera Contributor

gharish_0-1758908317148.png

Need to remove the Promote to Major incident in SOW workspace for P3/P4 incidents? Any suggestions on how to resolve the issue in detail?

2 REPLIES 2

SP22
Giga Sage
Giga Sage

Hello @gharish,

Open: System Definition → Script Includes.
-Locate MajorIncidentTriggerRulesSNC (read‑only) and MajorIncidentTriggerRules (your extension).
-Copy from MajorIncidentTriggerRulesSNC the functions canPromoteMIC into your editable MajorIncidentTriggerRules. Then add a priority check so they return false for P3/P4.

Sample script below:

var MajorIncidentTriggerRules = Class.create();
MajorIncidentTriggerRules.prototype = Object.extendsObject(MajorIncidentTriggerRulesSNC, {

  canPromoteMIC: function() {
    // Hide "Promote to Major Incident" unless P1 or P2
    if (current.priority != 1 && current.priority != 2)
      return false;

    // Defer to OOB logic
    return MajorIncidentTriggerRulesSNC.prototype.canPromoteMIC.call(this);
  },

  type: 'MajorIncidentTriggerRules'


If this helped to answer your query, please mark it helpful & accept the solution.

Thanks
Santosh.P

Viraj Hudlikar
Tera Sage

Hello @gharish 

Since you need to do it only in the sow workspace, you can edit the declarative action, which is showcased below for navigation.

VirajHudlikar_0-1758911910510.png

 

 Now open this record and add the record condition as per your requirement.

VirajHudlikar_1-1758912020077.png

 

Save it and navigate to the SOW workspace, and you won't see those declarative actions.

Before Change:

VirajHudlikar_3-1758912157368.png


After Change

VirajHudlikar_2-1758912079574.png

 

If you need this over the native UI, then just add the condition as showcased below:

VirajHudlikar_0-1758912514812.png

 

If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.