- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2016 01:00 PM
Hi, I would like some assistance in creating a UI Action on a custom table I created.
This button needs to save the form on table 1, and then redirect the user to a second/table form.
How would I script/build this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2016 01:43 PM
Hi Vibee,
Your script will contain two basic components.
current.update(); // save the current record (from table 1)
action.setRedirectURL(url_to_table_2_record);
The details of that url_to_table_2_record are up to you. It can either be a GlideRecord or a string. For example, if you have a GlideRecord for your other table...
var t2 = new GlideRecord('u_table2');
t2.get(current.u_reference_field_to_table2);
action.setRedirectURL(t2);
The above could also be done like this:
action.setRedirectURL('u_table_2.do?sys_id=' + current.u_reference_field_to_table2);
Or if you want to create a new record on table2, it might look like this:
action.setRedirectURL('u_table2.do?sys_id=-1');
That should give you some ideas. 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 06:05 AM
Comments added.