Script Include assignment group based on department
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 01:44 PM
Hello All,
I am junior in development and I got stuck in one script include, my goal is to assign sc_req_item and sctask to the assignment group which is based on user's department. For example Dep1, dep2, dep3. And then only people from these concrete assignment groups can make updates on fields which were read-only for end user who created this request. For example user ordered a table, but only users from assignment groups can edit information what kind of table, color and material. I understand i have to assign ticket first, then check group members and then make these fields editable only for these people. But to put it into code and make it work became difficult. Could you please assist with your experience? Should I use properties instead of sys_ids of department? How do I add that field "color_table" can be edited by users from these groups? I plan to call this script include from UI policy.
Thank you so much in advance!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 02:00 PM
Hello @Fotina Galieb
The fields which you're talking about are the variables of the catalog item?
If yes, you can use the below logic to make variables read-only (or) editable based on your logic:
g_form.setVariablesReadOnly(true); //it makes all variables read-only
Murthy