Auto populate fields through UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2018 04:32 AM
Parent Table parameters passing to child table through UI Action(Without Child Record Insert passing through URL ).
- Test Plan (Parent table) 2 fields Short description and instructions are Auto Map to Defects (Child table) fields Short description and description.
UI Action:
Name:My Defect
Table:Test Plan[tm_test_plan]
Form Button:True
On click:open_defect();
Script:
function open_defect(){
var shortdesc = g_form.getValue("short_description");
var instructions = g_form.getValue("instructions");
var URL = "/nav_to.do?uri=rm_defect.do?sys_id=-1%26sysparm_query=short_description="+shortdesc+"^description="+instructions;
top.location.href= URL;
}
- If click on my defect button its Auto populate 2 fields to without Insert child record .
Thanks,
Srinath Patel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2020 06:19 AM
Good answer Kunal. Just a minor note for those that may not be aware...
The difference between your method and putting the sysparm_query in the URL is your method creates the record first, then redirects. That creation may trigger business rules, workflows, etc..
The sysparm_query method takes you to a pre-populated form which can then be continued BEFORE triggering any logic.