Default value for a reference field on UI page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2023 04:31 AM
How to set a particular caller name as default value in Caller field(reference) on an incident form UI page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 09:45 PM
When my UI page (incident) is loading, a particular user has to be set as default and should get populated in caller_id field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 10:06 PM
when is the UI page loading?
how are you triggering it?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 10:16 PM - edited ‎03-26-2023 10:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 10:29 PM
Did you try methods suggested by other members?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 10:53 PM - edited ‎03-26-2023 10:56 PM
1. When changing the default value in dictionary, it would obviously reflect in other incident forms throughout, right??
2.When I tried using <g:ui_reference name="caller_id" table="sys_user" value='sys_id of user' displayvalue="${gs.getUser().getUserByID('sys_id of user').getDisplayName()}" />, the form loads and the caller field is not populated( but the "eye" icon displays the user record). On form submission, the caller field is empty.
3. document.getElementById("caller_id").value = "sys_id of user "; doesn't work as well