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.

How to hide Incident state Relolve drop down to a particular group?

Arjun Kumar Le1
Tera Contributor

How to hide incident state resolve drop down for a particular group member logins, please help in it.

 

ArjunKumarLe1_0-1702263518079.png

 

1 REPLY 1

Harish KM
Kilo Patron
Kilo Patron

Hi @Arjun Kumar Le1 There are 2 ways to do this.

1. Create a display BR on Incident table with below script

g_scratchpad.grp = gs.getUser().isMemberOf('ACME Support');// pass your group name
 
now create a on Load client script with below script:
function onLoad() {
// g_scratchpad.grp returns true if User is member of grp and hides the resolved state.
  if (g_scratchpad.grp){
      g_form.removeOption('state', 6); //closed complete
    }
}
 
2. Second way is through SCript include and glideAjax
Regards
Harish