- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 07:46 AM
Hello everyone,
How can I create a new record using a ui action calling a ui page? this is what I have so far:
1. ui action
2.ui page ( thank you to https://community.servicenow.com/community?id=community_article&sys_id=bb0e039fdb9b1054b1b102d5ca961942)
What I'm having problems now is, how can users click on the UI action, see the pop up window (ui page), add the information requested, click on Submit and create a new record with the information from provided?
Thank you
Solved! Go to Solution.
- Labels:
-
Request Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 08:53 AM
Ok let me give you Quick Demo here.
This is what i have built. See if this help you or not.
Note: if the intent is to create child task from ui page button click then use inside ui page client script . like i have done.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 08:43 AM
So the issue is your child task has not attached to your ritm ? this is the issue you are facing ?
if yes then you have to pass the sc_req_item record sysid and then in glide record you will use to set it like below.
var gr = new GlideRecord('sc_task');
gr.initialize();
gr.description= description;
gr.request_item= <ritm sysid which you have to get>;
gr.insert();
Reference:
To pass value from ui action to ui page html and then using the html field value in ui page client script.
https://servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 08:48 AM
The issue I'm facing is that the script I have in the UI action to call the ui page does not work because I have this:
this creates the the child task directly but does not call the ui page. My question is what do I need to add/modify in the script in the UI action to call the UI page?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 08:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 09:28 AM
Exactly that is what I need, and yes the intent is to create a child task from the ui page button click, I will use your information and let you know my results shortly...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 09:57 AM
Thank you it is working as I expected,
Thanks for your support!