How do edit Service Catalog Variables after submission on the RITM?

andresgt
Mega Expert

Hello,

Is there a way to make a variable editable to a certain group after the request is submitted?

The edit must be on the Request Item.

 

I was thinking on UI Policy or Client Script but don't know if there's an easier way to do this.

3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

Following thread should help

 

https://community.servicenow.com/community?id=community_question&sys_id=d94dcba9db9cdbc01dcaf3231f96...


Please mark this response as correct or helpful if it assisted you with your question.

shloke04
Kilo Patron

Hi,

 

You can do this as mentioned below:

 

1) Write a Display Business Rule on your Requested Item Table with the following script where you will be checking if the current logged in user is a member of the assignment group or not:

 

g_scratchpad.check_group = gs.getUser().isMemberOf('Mention your Group Name here');

 

2) Now write a on Load Client Script and check as per the script below:

 

Script:

if(g_scratchpad.check_group == true){

g_form.setReadOnly('variables.variable_name', false); //Specify your variable Name whom you wnat to be editable

}

 

If you want all your variables to be Editable then you can use the below Script:

if(g_scratchpad.check_group == true){

g_form.setVariablesReadOnly(false);

}

 

 

Hope this help. Please mark the answer as helpful/correct based on impact.

 

Regards,

Shloke

 

 

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

siddharth1
Tera Contributor

I tried this but its not working can you tell what i might be missing