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-27-2023 04:33 AM
Did this not work for you?
I have tested this and it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 05:31 AM
No @Anurag Tripathi ,
<g:ui_reference name="caller_id" table="sys_user" value="${gs.getUserID()}" displayvalue="${gs.getUser().getUserByID('sys_id of user record').getDisplayName()}" />
This populates my current logged in user record even though i pass a different user record's current ID and also it doesn't display anything on the field ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 05:53 AM
hardcode the sys_id and test.
I tested this and it works well so there is no issue with the code here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 06:37 AM
The eye icon, when clicked, displays the required record during onload. Also during onload , the caller field doesn't display anything. Tried the below and when I submit my form, the caller field is blank..
<g:ui_reference name="caller_id" table="sys_user" value="hardcoded the sys id" displayvalue="${gs.getUser().getUserByID('hardcoded the sysid').getDisplayName()}" />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 06:53 AM
Add a screenshot also explaining what you see and what you expect
