- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 11:14 PM
i have a related list and the fields of the same table above when i click on button a new record should be created and related list has to be updated
can you please help with the code
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 11:43 PM
Hi,
It gets more clarity now to me. So you want to get redirected back to the form after a new record is created via clicking on the Process UI Action. If this is what you are looking for, please use this line at the end of the Server Side code in your 'Process' UI Action: action.setRedirectURL(current);
The above line will help you to redirect to the current form once all the Script is being executed. For more details in understanding please refer: UI Actions - ServiceNow Wiki
I hope this helps. Please mark correct/helpful based on impact

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 12:05 AM
Just wanted to check, the related list table is same table where you are creating the new record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 12:20 AM
yes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 12:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 11:20 PM
user current.insert to create new record and setRedirectURL for redirecting on same page.