Toolbar Adding a button stopped working with V2.0.4

A recent change (this weekend it appears) by Plumsail has broken the following code:

fd.toolbar.buttons.push({ icon: 'TriggerApproval', class: 'btn-outline-primary', text: 'Approve', click: function() { ApprovePOR(ap.Id, "Approved"); } });

I saw the documentation updated to add a new parameter, location, but this is also not working

fd.toolbar.buttons.push({ icon: 'TriggerApproval', location: 0, class: 'btn-outline-primary', text: 'Approve', click: function() { ApprovePOR(ap.Id, "Approved"); } });

It appears that the new Comments button that is automatically added is causing the issue.
I have tried location 0 (documentation says should be on the left) and 1 neither work.

In the console, when I check fd.toolbar.buttons I see the 4 default buttons (Edit, Close, PDF and Comments) as well as my added button in the 4th ordinal, and the location value is 0, but I do not see the button on the form.

Note: The adding of buttons works on any forms I have not saved this morning with either 2.0.3 or 2.0.4, but if I opened and edited any forms today and saved with that version the buttons stop appearing.

Note, this was working on Friday afternoon EST, so it is something that has changed since then.

I found the fix. Had to add visible: true to the object.

1 Like

Dear @sphilson,
We've released a hot fix for the issue of the visible parameter, it's not necessary anymore - please, clear browser's cache. Shouldn't be an issue anymore for new or existing buttons.