how to open a new tab when you click a UI Action button?

Faraz2
Tera Contributor

here is script i am using in my UI Action:

 

var change = new GlideRecord("change_request");
change.initialize();
change.short_description = current.short_description; 
change.description = current.description;
change.cmdb_ci = current.cmdb_ci;
change.priority = current.priority;
change.assigned_to = current.assigned_to;
var changesysID = change.insert();
gs.addInfoMessage("Change " + change.number + " created");
action.setRedirectURL(change);
action.setReturnURL(current);

 

 

i am trying to open a new tab when i click on a UI Action button.

any help would be appreciated.

Thanks

16 REPLIES 16

not working 😞

Upender Kumar
Mega Sage

not working 😞

SOUMYA09
Mega Guru

Hello Faraz,

window.open('your url','_blank');

And Please refer to this link: https://community.servicenow.com/community?id=community_question&sys_id=316f8325dbdcdbc01dcaf3231f96...

 

Hope this thread might resolve your query.

 

Please mark the answer correct/helpful, if applicable.

 

Regards,

Soumya

Faraz2
Tera Contributor
window.open('your url','_blank');

Can't figure out the "URL" if i am giving it "change_request.do" its opening a blank change form but no values in it as i am trying to populate some field values from incident form.