How to redirect the record to the parent record using ui action

Kishor O
Tera Sage

I created ui action to create a sc_task from ritm record. Once the ui action is clicked there should be certain fileds autopopulate and once they submit sc_task it should redirect record to parent record i.e . Ritm record.

 

My ui action script

 

var url = new GlideURL("sc_task.do");
url.set("sys_id", "-1");
//url.set("sysparm_query", "^parent=" + current.sys_id);
url.set("sysparm_query", "^request_item=" + current.sys_id);
action.setRedirectURL(url);

 

1 ACCEPTED SOLUTION

Kishor O
Tera Sage
action.setReturnURL(current);
is worked for me.
 

View solution in original post

1 REPLY 1

Kishor O
Tera Sage
action.setReturnURL(current);
is worked for me.