I've discovered a typo on "my" EAM's app.js sources, on the class that handle the main toolbar.
If you want to access the main toolbar's "new record" button there's the expression
EAM.Utils.getScreen().getMainToolbar().getNewRecordButton()
... that returns null !
The reason is a typo on "my EAM's" app.js sources for EAM.view.common.MainToolbar class, where the function is defined as
getNewRecordButton: function() {
return this.down('button[action=rewRec]')
}
with the typo "rewRec" instead of "newRec".
While waiting an EAM update I'll use the obvious workaround
EAM.Utils.getScreen().getMainToolbar().down('button[action=newRec]')
that works as expected.
Just for a casual watcher : the other main toolbar functions to access standard buttons available are
getCopyRecordButton()
getDeleteButton()
getResetButton()
getSaveButton()
while the other buttons can be reached by their actions:
copyRec, deleteRec, enterDesigner, help, newRec, nextRec, previousRec, printPreviewRec, printRec, resetRec, saveRec.
Bye,
Davide