The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Brian Arndt1
Mega Expert

I've long been waiting for a ServiceNow platform feature to allow me, when looking at the form view of an existing record in the content frame of the standard user interface, to open the form in its own window. The need typically occurs when I want to look up some related piece of information and I need to navigate away from the current record but want to keep it close at hand.

In lieu of a ServiceNow feature, I created my own UI action.

Name: Pop Out (or whatever you want to call it)

Table: Global

Order: -2,000 (or wherever you want to put it)

Client: true

Form button: true

Show update: true

Hint: Open this record in a new window

Onclick: popOutLink()

Condition: none (unless you want it only available for certain users)

function popOutLink() {

  g_form.checkMandatory = false; //opt out of the check for empty mandatory fields

  var table = g_form.getTableName(); //used to build the table name portion of the URL

  var record = g_form.getUniqueValue(); //used to build the unique ID portion of the URL

  //if any of the fields have changed without being saved yet, confirm

  if(g_form.modified){

            if(!confirm('Changes have been made that will not be carried over to the new window.\n\nDo you want to continue opening this record in a new window?')) {

            return;

            }

  }

  window.open(table + '.do?sys_id=' + record);

}

While I'd prefer the function to be part of the platform (a little popout arrow would look right at home in the title bar next to the attachment icon), this gets the job done until scott.ferguson can make that happen).

Let me know if you have any ideas for improvement!