Service Catalog Item - How to make assignment group read only (or not changeable)

Michael Gedzelm
Tera Contributor

Hello.  For a service catalog item,  we have a requirement that the assignment group is set SOLELY based on the response to one of the questions in the item (variable).  I have gotten this to work by creating UI policies and a business rule. However, the problem is that a user can still edit the item and directly modify the assignment group. I don't want that to happen.

 

  • I have tried setting assignment group to readonly - g_form.setReadOnly('assignment_group',true); - in an onLoad client script for both the item itself and for the sc_req_item table. Neither worked. I have tried many many things such as doing it in a UI Policy, first making assignment_group not mandatory, etc.
  • I have also tried to set the value back to the odl value using an onChange function, but to do this, I must first determine if the change is happening via code (which is allowed) or via the user directly attempting to change the assignment group field (which is not allowed). I can't do that because g_form doesn't allow me to determine which field has the focus.

Any help is greatly appreciated.  Thanks!

1 ACCEPTED SOLUTION

Hello,

 

if you want to make the assignment group read only for one particular catalog item. Create a Ui ploicy on the sc_req_item table as below:-

 

Saurav11_0-1668017454760.png

 

And then create the UI policy action for assignment group and have it as readonly .

 

Also set the order of the UI policy to 1000:-

 

Saurav11_1-1668017653939.png

 

Please mark my as answer as correct based on Impact.

 

 

View solution in original post

5 REPLIES 5

AnilM99
Tera Expert

Hi 

Use Data policy, If you want to do for a specific catalog item apply condition Items is catalog item Name, so user can't modify from list view

or

Go to Dictionary and add Dictionary overrides (Assignment group is Task table) and set to read only

 

Please mark my response as Correct / Helpful based on Impact.