I created the button on Ribbon Workbench and associated it to a command, which is related to a JS function (emtpy, for now).
I need to implement this JS function to set the visibility of a button.
It's not clear to me how should I pass the execution context to the function and how should I refer to the button (should I use its logical name as if it was a field?)
I saw the following example related to a script which was associated to a form:
formContext.getControl("logical_name_of_the_button?").setVisible(false);
...but in that case the formContext was retrieved through the execution context, which is a parameter passed by default to the function while setting the web resource from crm configuration (by selecting "pass the execution context as first parameter"), is it correct?
If it's correct, how should I pass the context in this case instead?