Need to make two fields as editable for other users without using ACL

Abhilasha G T
Tera Contributor

Hi Team,

 

I have created 2 string fields as below, as a admin i can edit and modify these fields ,

AbhilashaGT_0-1698748618412.png

 

As a Qualifier and Dispatcher user these fields are read only , they need those above  fields to be editable, please let me know how to achieve , without ACL ,

 

Because Elevator Role we are not having.

2 REPLIES 2

Vishal Birajdar
Giga Sage

Hi @Abhilasha G T 

 

You can write onLoad script or use script option in UI policy :

 

 

if (g_user.hasRole('Qualifier')  || g_user.hasRole('Dispatcher') ) {

	g_form.setReadOnly('field_name'_1,false);
        g_form.setReadOnly('field_name_2',false);
} 

 //you can adjust the conditions for other user as well

 

 

Note : if there is any ACL is running then it will not work...

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Community Alums
Not applicable

Hi @Abhilasha G T ,

Dictionary for the Field is set to Read Only. 

  1. As an admin, Right-click the field which is read-only and choose Configure Dictionary.
  2.  If the read-only field is checked then that is why the field is read-only.

UI Policy, Data Policy, or Client Script is setting the field to read-only or disabled. 

  1. As an admin, view the form inside the Nav frame. 
  2. Right-click the field and select Watch '<fieldname>' then reload the form. For more info on the field watcher, review these Docs.
  3. Identify the Client script or UI Policy which is setting the field to read-only.

     



  4. If the UI Policy mentioned in the field watcher does not exist or the link doesn't work, then there may be a corresponding data policy so check System Policy > Rules > Data Policies for that name.
  5. If more information about what is setting the field read-only is needed, you can use the Debug Data Policies and Debug UI Policies modules to get more information about how those policies are evaluating. Here are our Docs on how to do that: Debug UI Policies