Can anybody guide me on how I can Hide the “Secondary Action Label” Button in Multi Select Dialog?
In the following image its the Make cheque button
Thank you in advance
Any particular reason you wish to hide this?
Because the only way to add new cheque is by payment entry, so I should prevent the user to add cheque by clicking this button.
The only way I can see to do it would be to extend frappe.ui.form.MultiSelectDialog (see here).
You’d have to rewrite the make() method, which is a bit annoying to wrangle. Alternately, you might just extend the base Dialog object to create precisely what you want. It’s not well documented, but the example in MultiSelectDialog gives a pretty good illustration of how to do it.
any solution…?
YOUR_OBJECT_NAME.dialog.get_secondary_btn().addClass("hide");
this does not work
This should be after dialog.show();
