- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 02:37 AM
Hi All!
Here on the pop-up based on CI i need to fill the other service, application service and service offering fields and save it on incident form.
How do i do that ? can anyone help me with this.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 05:03 AM
you want to auto-populate then make the fields readonly on UI page.
if you want to auto-populate and also allow user to select other value then check this link how to set reference field on UI page when UI page loads
check this link and enhance as per your requirement
Store value in reference field of ui page using client script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 04:39 AM
in out of the box UI page I could see only these fields.
Seems your UI page is customized
Do this as I mentioned. I did it in Create Problem UI action. You can update yours one
function ShowToCreateProblem() {
var sysId = g_form.getUniqueValue();
var title = getMessage("Create Problem");
// use GlideAjax here and get the service, application service and service offering field values by passing the CI value to script include
// then set those in preferences and update your UI page to populate it
// since you want to auto-populate the service, application service and service offering fields on UI page why not make them text type and readonly and not make them reference type
var dialogClass = GlideModal ? GlideModal : GlideDialogWindow;
var dd = new dialogClass("sn_si_create_prb_change_inc");
dd.setTitle(title);
dd.setPreference('sysparm_sys_id', sysId);
dd.setPreference('sysparm_action', "problem");
dd.setWidth(500);
dd.render();
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 04:44 AM
@Ankur Bawiskar
Thanks...
and also say CI is not filled and later while pop-up they need to fill the service application and so at that time , how shall i give the condition in this case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 05:03 AM
you want to auto-populate then make the fields readonly on UI page.
if you want to auto-populate and also allow user to select other value then check this link how to set reference field on UI page when UI page loads
check this link and enhance as per your requirement
Store value in reference field of ui page using client script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader