
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 04:03 AM
Hi all,
I want to create a new record in another table(extend from the parent) when click on the Parent table UI action . It was working fine and coming the related list of parent record.
My requirement is :
When user click on UI action it will redirect to child table and stop save the record until user click on save or submit.
If user click on reload form or page or frame or back in the browser record couldn't be saved.
ServiceNow Commnunity MVP -2018 class.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 04:36 AM
Hi Karthik,
OOTB the new Ui Action in the related lists do not insert the record until its not manually saved by user. Have you created a custom ui action for this functionality?
If you have created a custom ui action just to populate some information in the new record then same is possible with URL itself. redirect user to
table_name.do?sys_id=-1&sysparm_query=parent=<parent_sys_id>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 04:16 AM
Hi Karthik,
You can redirect a record with sys_id=-1, then system recognizes it as a new record.
Regards
Swamy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 04:34 AM
Hi Swamy,
Thanks for the response.
With sys_id=-1, then system recognizes it as a new record and that's fine.
But
When user click on UI action it will redirect to child table and stop save the record until user click on save or submit.
If user click on reload form or page or frame or back in the browser record couldn't be saved.
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 04:30 AM
Hi Karthik,
You can use setRedirectURL and setReturnURL in your UI action.
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 04:36 AM
Hi Karthik,
OOTB the new Ui Action in the related lists do not insert the record until its not manually saved by user. Have you created a custom ui action for this functionality?
If you have created a custom ui action just to populate some information in the new record then same is possible with URL itself. redirect user to
table_name.do?sys_id=-1&sysparm_query=parent=<parent_sys_id>