How to create a new record using a ui action calling a ui page?

josenava
Tera Expert

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

find_real_file.png

2.ui page ( thank you to https://community.servicenow.com/community?id=community_article&sys_id=bb0e039fdb9b1054b1b102d5ca961942)

find_real_file.png

find_real_file.png

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

1 ACCEPTED SOLUTION

Ok let me give you Quick Demo here. 

This is what i have built. See if this help you or not. 

 

find_real_file.png

 

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. 

View solution in original post

13 REPLIES 13

Harsh Vardhan
Giga Patron

You have to use glide record inside the ui page client script

 

eg:

 

var gr = new GlideRecord('table name');
gr.initialize();
gr.description= description;
gr.insert();

Thank you Harshvardhan,

as for the script in the UI action, how do I need to modify it so that when users click on the button, the pop up window shows? 

Thank you

 

You are saying you want to update the record where user click on popup button ?

 

Can you add some screenshot ? 

Sure, what I need is that when users click on the Button this is what needs to happen:

1.User clicks on the button

find_real_file.png

2. pop up window comes up 

find_real_file.png

3.User updates the info and clicks on "Submit":

find_real_file.png

4. A new record is created, a child task from the RITM

find_real_file.png

 

thank you