Other group users when changes 'Service' does not change the 'Urgency' criticality

rishabh31
Mega Sage

Dear Team,

 

There is an onChange Client Script in the Incident table which enables onChange of 'Service' (business_service) change the 'Urgency' (urgency) field criticality (below is the script screenshot)

rishabh31_0-1707211174740.png

 

rishabh31_1-1707211206076.png

Now, since there is an ACL as well which is working like if the current Loggedin User is a member of Group ITCC then only they can write the field 'Urgency' through role 'sn_incident_write', the rest of any other group member will not be able to write the 'Urgency' (for other group members, 'Urgency' becomes Read-Only) (refer below screenshot)

 

rishabh31_2-1707211672108.png

 

rishabh31_3-1707211705384.png

 

But this ACL impacts the functionality of onChange Client Script because when other group members change the selected 'Service' (business_service) on the Incident record then 'Urgency' does not reflect the changed urgency business criticality i.e., it remains fixed/unchanged (which is not desirable) while it works fine for ITCC group members (as currently logged in user) and admins i.e., only these ITCC Grp Members and admins can able to see the changed Urgency on change of Selected 'Service'.

 

Now what is needed here is that other group members (users) should also observe the change in Urgency on the change of Service (due to the above client script) while keeping the Urgency field on 'Read Only' (due to the above ACL) and for ITCC and Admins it should work as it is.

 

Requesting please help here with any modifications on the onChange Client Script or any other advice through which this above requirement can be acheived.

 

Thanks in advance

 

 

 

 

7 REPLIES 7

Mark Manders
Mega Patron

Can you replace your ACL with a scripted UI policy or a Client script, so it checks on the logged in user's groupmembership and makes it read only based on that? Your client script (which is client side) will not go around an ACL (which is server side). If you need the visibility on the form, you can't use a business rule or flow to set the urgency, so it will have to be a client side solution, for which your ACL is in the way.

Your request to have other outcome, without changing the current setup (client/server side) will, unfortunately, not work.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Client side script:

if (!gs.getUser().isMemberOf('your_group')) {
g_form.setReadOnly('urgency', true);
}

Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Thanks @Mark Manders sir is this onLoad Client Script which you shared?

You can use the script as either an onLoad client script or as a scripted UI policy. Inactivate the ACL, apply the script (including your own groups) and make sure it works.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark