- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 09:04 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 10:14 AM
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:-
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:-
Please mark my as answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 10:40 AM
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.