- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2020 10:42 PM
Hello Everyone,
I have reference field in UI page where I am setting the value as below,
<g:ui_reference name="module" id="module" table="u_nowmodule"/>
gel('module').value='7cf7a0861be55c50191adc6a9b4bcb1d';
gel('sys_display.module').value='Incident Management';
this sets the value fine but it is not showing i icon beside it. Please refer below image,
Any help would be appreciated.
Thanks.
Regards,
Abhijit
ServiceNow MVP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2020 10:59 PM
Hi Rich,
can you try to add this 1 line after your existing and it should work fine.
gel('module').value='7cf7a0861be55c50191adc6a9b4bcb1d';
gel('sys_display.module').value='Incident Management';
gel('moduleLINKreplace').style.display = "";
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2020 11:33 PM
Nice
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2023 02:54 AM
I think I've found a better way to do this. The script which verifies the new reference field value is on an onChange event handler, which isn't triggered when the value is updated programatically.
Running this script (to manually dispatch the event) after the value change makes it work much better for me.
document.getElementById('module').dispatchEvent(new Event('change'));