In change form fields editable for CAB_IT_Change Managers

nameisnani
Mega Sage

Hi Team ,

 

CURRENTLY: Anyone can edit the "CAB Required" and "CAB Date/Time" fields


ISSUE: These fields are used by Change Management Team to add changes that are ready for CAB to the appropriate CAB Schedule and will be used in CAB workbench filter - It is not appropriate for users outside of the Change management team to be able to edit these fields


EXPECTED BEHAVIOUR: Only members of Group "CAB_IT_Change Managers" - should be able to edit these fields

 

And it should editable for particular this [ CAB_IT_Change Managers" ] Group . How achieve this requirement please steps .  

 

 

SunilKumarPadh_0-1683709152615.png

 

@Community Alums 

@Prince Arora

@Sandeep Rajput 

@OlaN 

@BharathChintala 

@Vasantharajan N 

@Sagar Pagar 

@itsRakesh 

 

Please provide solution . 

 

Thanks 

2 ACCEPTED SOLUTIONS

BharathChintala
Mega Sage

@nameisnani 

Create an Write ACL on Change request table field level 

you have to write Acl for each field

 

In role give snc_internal

 

check advanced in script write below

if(gs.getUser().isMemberOf('replace sysid of group'){

answer = true;

}else

answer = false;

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

View solution in original post

Hi @nameisnani ,

You need to adjust your ACL.
1) Select the field on which you want to apply the ACL.
2) In the script, you must mention the group's name instead of sys_id.

Thanks,
Rakesh.

View solution in original post

7 REPLIES 7

Hi @nameisnani ,

You need to adjust your ACL.
1) Select the field on which you want to apply the ACL.
2) In the script, you must mention the group's name instead of sys_id.

Thanks,
Rakesh.

BharathChintala
Mega Sage

@nameisnani If you want to do it with Client script

Step 1: Create a display Business rule with script as. Place the below script between function templates in script body.

 

g_scratchpad.grp = gs.getUser().isMemberOf('PASS GROUP SYSID HERE');  



Now create the onLoad client script as

 

function onLoad() {

 

  if (!g_scratchpad.grp){

 

      g_form.setReadOnly('field backendname', true); 

 

      g_form.setReadOnly('field backendname', true);

 

      g_form.setReadOnly('field backendname', true);

 

    }

 

}

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

cyberrule92
Kilo Contributor

To achieve this requirement in ServiceNow, follow these steps:

1. Open the "Change Request" table in the ServiceNow application.
2. Click on the "Gear" icon in the top right corner of the screen and select "Configure".
3. Select "Dictionary" under "Data".
4. Find and click on the "CAB Required" field in the list of fields.
5. In the "Dictionary Entry" form, find the "Attributes" section and click on the "Edit" button.
6. In the "Attributes" pop-up window, find the "Roles" field and add the "CAB_IT_Change Managers" group to the list of roles.
7. Save the changes and repeat steps 4-6 for the "CAB Date/Time" field.

Now, only members of the "CAB_IT_Change Managers" group will be able to edit the "CAB Required" and "CAB Date/Time" fields in the Change Request table.

Note: It's important to ensure that users outside of the "CAB_IT_Change Managers" group are not given "write" access to these fields at the record level, as this would still allow them to modify the fields. To restrict record-level access, you can configure ACLs (Access Control Lists) for the Change Request table.