Is it possible to add both a client handler and server handler to a menu bar item?
Below is the code in which I added a server handler but can’t seem to add a 2nd handler.
// create menu bar
var menuBar = app.createMenuBar().setWidth(600);
menuBar.addItem('New CA', newCA_handler).addSeparator()
.addItem('Unapproved CA', unapproved_handler).addSeparator()
.addItem('Approved CA', approved_handler).addSeparator()
.addItem('Cap List Detail', capList_handler)
If I code menu items this way with setCommand, it replaces first handler
var menuItem0 = app.createMenuItem('MenuItem0', handler);
menuItem0.setCommand(test_handler);
It seems like it is not possible to do that. This seems like a good candidate for an enhancement request on Apps Script issue tracker.
Also, when searching the tracker to see if there wasn’t already an issue opened regarding this, I found other more critical problem regarding menuItems, you may want to star it.