- 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 10:45 PM
Hi,
I had faced similar issue in past.
Can you share the complete script
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 10:51 PM
Hi Ankur,
Thanks for your reply.
I cannot share the complete script, but I would like to explain,
I have one reference field in html
<g:ui_reference name="module" id="module" table="u_nowmodule"/>
In the client script, I am setting its value as below while loading the page,
gel('module').value='7cf7a0861be55c50191adc6a9b4bcb1d';
gel('sys_display.module').value='Incident Management';
It is setting value fine but it is not showing i icon.
The above sys_id and Display value available in the referenced table.
let me knwo if you need any more details.
Thanks.
Regards,
Abhijit
ServiceNow MVP
- 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:18 PM
Thank you so much Ankur,
By inspecting it I found that icon id is 'moduleLINK' not 'moduleLINKreplace', so below line worked for me,
gel('moduleLINK').style.display = "";
Thanks.
Regards,
Abhijit
ServiceNow MVP