Each toolbar button has default behavior, which may need to be changed. The AuthenticCommand event allows you to add additional tasks to, or entirely redefine, the default behavior of toolbar buttons. Scripts can use the AuthenticCommand event to receive notification each time the user clicks a toobar icon.
Please note that not every command (from the Authentic.UICommands collection) has its own associated event. To find out which icon the user clicked, the script has to check the AuthenticEvent.srcElement property, which contains a reference to a corresponding AuthenticCommand object.
// event handler for OnDocEditCommand
// we are interested in the k_CommandSave button
if(objPlugIn.event.srcElement.CommandID == 1)
// instead of the standard HTTP PUT we want to use
// a HTTP POST
// no standard execution follows
objPlugIn.event.cancelBubble = true;
For available commands, see AuthenticToolbarButton.CommandID.
© 2018 Altova GmbH