Set field value to true on incident form for specific user

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 02:15 PM
We have a user that is named External User in our user table. I would like to toggle a custom field 'u_external_user' field true if the user is selected. I am using an onChange client script but need some help with the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 02:43 PM
@Community Alums
You can use onchange client script if you are looking to update u_external_user flag on the form itself.
Sample onchange client script using getReference method with a callback function.
Or you can use onbefore business rule and update the flag using Set fields. Business rule will update the flag only after record is saved.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 03:39 PM
When I use this script (I had a similar script earlier) this is the error I get:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 04:09 PM
Hi @Community Alums the recommended method looks right, please share your client script - will make it easier to debug,.
--
Bala G