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 make Impact and urgency field editable on problem form for specific group

Anupriya_11
Tera Contributor

Hello all, 

I have tried to create an write ACL, but it is not working  . Can anyone help me on this.

 

regards,

Anupriya

6 REPLIES 6

Sumanth16
Kilo Patron

Hi @Anupriya_11 ,

 

I am assuming it is a sc_req_item table with a custom field requested by. Here is how you should configure your ACL.

 

Sumanth16_0-1709700804692.png

 

Sumanth16_1-1709700804780.png

 

Here is the script.

 

answer = false;
if ( gs.getUser().isMemberOf(current.assignment_group.getDisplayValue()) ) {//replace with your group name
    answer = true;
}

 

Here I have assumed that u_requested_by is a custom field representing Requested by. Please update it according to your field name.

 

Also, with Admin override no separate role checking is needed but still I put the role check for admin in script just in case if you wish to uncheck admin override checkbox.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

swathisarang98
Giga Sage

Hi @Anupriya_11 

 

If acl is not working you can try this with display business rule and onload client script as below,

Business Rule:

swathisarang98_0-1709720128151.png

 

(function executeRule(current, previous /*null when async*/) {

	g_scratchpad.isGroupMemeber =gs.getUser().isMemberOf('Hardware');

})(current, previous);

 

Onload client script:

swathisarang98_1-1709720165372.png

 

function onLoad() {

    var groupMem = g_scratchpad.isGroupMemeber;

    if (groupMem == true) {
        g_form.setReadOnly('urgency', false);
		g_form.setReadOnly('impact',false);
    } else {
        g_form.setReadOnly('urgency', true);
		g_form.setReadOnly('impact',true);

    }

}

 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang