Need to populate the field value of one form to another form using UI action.

Abhilasha G T
Tera Contributor

Hi Team,

 

we have a field name Street in the below form and it is  in the table   say ABC, and u can see Test location UI Action on the form, once we click on the UI action button 

AbhilashaGT_0-1689862957385.png

 

we are able to redirect to new form (work order)

var url = '/wm_order.do?sys_id=-1';

action.setRedirectURL(url);

and it is having a same field name Street but it is configured in different table say CDE, we want the street field value should be copied from the previous form to new form ie, CDE table form.

 

Kindly help to achieve this .

 

1 REPLY 1

Clara Lemos
Mega Sage
Mega Sage

Hi @Abhilasha G T ,

 

In your UI Action you an try use something like this:

 

var new_rec = new GlideRecord('name of the table that you are creating the new record');
new_rec.setValue("name of the field that you want to set the value", current.name of the field that you want to copy the value from);
action.openGlideRecord(new_rec);
Let me know if that helps !