Hide Resolve option from State field in Incident List View

MohitSaxena
Tera Contributor

Hi Team,

 

Could you please help me regarding my requirement to HIDE Resolve Option from State field in Incident List View. 

3 REPLIES 3

Tanushree Maiti
Mega Patron

Hi @MohitSaxena 

 

Using   list_edit  ACL and onCellEdit() Client script , you can hide Resolve option from State field in Incident List View.

  

  • Navigate to Client Scripts > New.
  • Table: Incident.
  • Type: onCellEdit.
  • Field name: State.


function onCellEdit(sysIDs, table, oldValues, newValue, callback) {

    var saveAndClose = true;

        if (newValue == '6')  //set the correct Resolved state value
 {

        alert('Incidents cannot be set to Resolved from the List View.');

        saveAndClose = false;

    }

    callback(saveAndClose);

}

 

Refer: https://www.servicenow.com/community/developer-forum/hide-state-options-on-oncell-edit-%EF%B8%8F/m-p...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Hi @Tanushree Maiti ,

Thanks for your reply, But I do not want to give an alert but absolutely Hide it from List view. 

Ankur Bawiskar
Tera Patron

@MohitSaxena 

You can't hide the drop down choice in list view

You have only 2 approaches here

1) restrict the list edit for that field using list edit ACL

OR

2) use before update business rule and stop the update using current.setAbortAction(true)

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader