Popup window fields testing through service now ATF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2019 08:33 AM
I'm trying to enter values in the below popup window fields by using the below ATF server side script.But it's not entering any values.
var dialog = new GlideDialogWindow("popup window id");
var ag=g_form.getValue("XXX");
var rep=g_form.getValue("YYY");
dialog.setPreference("assignment_group", ag);
dialog.setPreference("representative", rep);
Any help is grateful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2019 12:48 AM
Hi Pradhi,
Is there any specific reason for you to use server side script.
If there isn't any , try using "set field values" which is much more easier and straight forward.
Regards,
Venkat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 10:33 PM
Hi Venkat,
I already tried this using "set field values" step. But it's not passing any values in the popup window fields. That why I want to give a try with a server side script.
Regards,
Pradhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2019 02:42 AM
Hello Pradhi,
You need to use the 'Set Component Value' under Custom UI category. You need to first click on the 'Retrieve components' then you will be able to see the fields from the pop-up and then you will be able to populate the values. This will fetch the fields of type date and reference only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2020 10:34 AM
I see the error message as "Step execution failed with error: Unable to get property 'ownerDocument' of undefined or null reference"