Ui action to open a record from task

sooryamohan
Tera Contributor

We have a requirement to open a server record(form view) using an ui action 'Decomission server'.The ui action is in task form. While clicking' Decomission server'  the server record which is mentioned in the task should be opened,so that support engineer can decommion the server easily.

Kinldy help to achieve this.

1 ACCEPTED SOLUTION

try now

 

 

function set()
{
var cec = g_form.getValue('cmdb_ci');
var url = '/cmdb_ci.do?sys_id='+cec;
window.open(url,'_blank');
}

 

find_real_file.png

View solution in original post

7 REPLIES 7

sai krishna10
Giga Guru

place the sys_id based on the requrirement

 

action.setRedirectURL('u_table_2.do?sys_id=' + recordsys_id);

Mark as correct or helpful based on the impact.

sooryamohan
Tera Contributor

Based on the server field in task form,while clicking on Create Sever ui action,the corresponding server form(which is specified in task's Sever field) need to get open.

Can you plaese elaborate the code? 

 

 

action.setRedirectURL('u_table_2.do?sys_id=' + recordsys_id);

In this code replace u_table_2 with the task server table that you want to open the record and recordsys_id with the field in the task table. below will help you.

 

 

recordsys_id = current.serverField;

action.setRedirectURL('TaskServerTable?sys_id=' + recordsys_id);

recordsys_id = current.cmdb_ci;
action.setRedirectURL('cmdb_ci?sys_id=' + recordsys_id);

I used the above code in ui action ,but no luck 😞