Monday, May 6, 2019

Open a new tab/window after pressing a button

It is possible to open a new tab/window with specific URL in browser after hitting a button.

Save button
- Type: Client Side
- Trigger: Save Record

function saveRecord(){'', '_blank');
return true;


Custom button
- Type: User Event
- Trigger: Before Load

function beforeLoad(type, form){

var script = "'', '_blank');";
form.addButton('custpage_button_reject_reason', 'TEST', script);


Type of the opening instance (new window/tab) depends on browser's settings and cannot be covered by a script.