Page 1 of 1

Add Action Buttons on Browse Screen

Posted: Fri Mar 21, 2014 7:49 pm
by massiws
After searching and filtering records on Browse screen, I want to be able to run an activity with an extra button, the same workflow as Print button, but with my logic.
I tried to solve with jQuery in nuLoadThis() function:

Code: Select all

function nuLoadThis() {
    $(".actionButton").filter(":last").append("<input>");
}
but don't work: new button dont appear.
Tried also to use addJSfunction() in Before Browse with the same result.

Is there a way to add an extra button to Browse Screen to run an activity?

Max

Re: Add Action Buttons on Browse Screen

Posted: Mon Mar 24, 2014 9:46 am
by massiws
I found a solution to make Extra Action buttons appear on browse form!

I added this code in Custom Code > Before Browse:

Code: Select all

$js = <<<EOJS
function nuLoadThis() {
  /* Append a new Action Button on Browse form */
  var elem = '<input id="execButton" type="button">';
  $( "#actionButtons" ).append( elem );
  $( "#execButton" )
    .addClass( "actionButton" )
    .attr( "value", "Execute" )
    .click(function() {
      // Do something
      alert( "Clicked!" );
    });
}
EOJS;
addJSfunction($js); 
BrowseActionButton.png
Max