- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 02:53 AM
Hi,
I have the field 'resolved_by' and I need to set it as the current user (the user that is taking the action of changing the state) when the state change to resolved.
Can anyone please help me how do I write the onchange client script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 03:10 AM
Hi @Alon Grod
Resolved By is already auto populated OOTB when Incident or Problem is Resolved by current user.
If you want to make it happen for any other table, its recommended to use Business Rule instead of Client Script.
Condition: State changes to Resolved
When : After Update
Code:
current.resolved_by = gs.getUserID();
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 03:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 03:10 AM
Hi @Alon Grod
Resolved By is already auto populated OOTB when Incident or Problem is Resolved by current user.
If you want to make it happen for any other table, its recommended to use Business Rule instead of Client Script.
Condition: State changes to Resolved
When : After Update
Code:
current.resolved_by = gs.getUserID();
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 03:12 AM
Hi,
Im trying to do this for sc_req_item and sc_task tables, so should I use a BR with script? if yes can you plesae help with the script