Open UI16 URL from Agent workspace

ramwons
Kilo Expert

I like to open UI16 URL from an UI action in Agent workspace.

I have a UI action "Create Security Incident" in an Incident form. By clicking the button it should redirect to Security Incident new record creation form in UI16.

I used below line of code in workspace script in UI action but it is not working. Please suggest.

action.setRedirectURL('sn_si_incident.do?sys_id=-1&sysparm_query=parent='+current.sys_id);

4 REPLIES 4

Anil Lande
Kilo Patron

Hi,

Given below  are three possible options, you can use any of these as per your need:

find_real_file.png

 

function onClick() {
    //top.window.location ='sn_si_incident.do?sys_id=-1&sysparm_query=parent='+g_form.getUniqueValue();
    //top.window.open('sn_si_incident.do?sys_id=-1&sysparm_query=parent='+g_form.getUniqueValue(), '', 'height=500,width=800');
    top.window.open('sn_si_incident.do?sys_id=-1&sysparm_query=parent=' + g_form.getUniqueValue(), '_blank');
}

 

Uncomment one and comment other two line and test, all three line have different behaviors.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

ramwons
Kilo Expert

Thanks for your reply Anil.

I tried all the 3 options by commenting one after another. The link is not redirecting to UI16 but it is opening within agent workspace.

 

find_real_file.png

Best Regards,

Ram.

 

Can you please share screenshot of your UI action?

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi Anil,

Attached the screenshots. Please let me know if you are not able to see the screenshot/

Best Regards,

Ram