Page 1 of 1
How to click a OpenDental.UI.ODToolBar.ODToolBarButton?
Posted: Wed Sep 02, 2020 11:26 am
by dcrider
Usually buttons have a PerformClick() method, however, I've noticed that ODToolBarButtons do not have such a method. I have a popup that makes our teammates make a choice. Choice A should programmatically click the Payment button and Choice B should open a custom form we created, but that has a button on the toolbar similar to the Payment button.
I would like to handle the clicking of those buttons programmatically and was wondering how that could be accomplished?
Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?
Posted: Wed Sep 02, 2020 11:31 am
by allends
The easiest method is going to be to add a hook to this method "toolBarButPay_Click" in ControlAccount.
That way you can pose a question to perform your logic when the customer clicks the Payment button.
Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?
Posted: Wed Sep 02, 2020 11:36 am
by dcrider
Yes, I've done that. Now I would like to perform a click on one of the two other buttons depending on their selection.
Basically I want my code to DO the clicking, not just act on a button being clicked.
Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?
Posted: Thu Sep 03, 2020 11:18 am
by allends
What is initiating this code that you want ran?
I may be misunderstanding, but you should be able to place your question into the hook in the payment click.
Then you could open your custom form if they chose, or just let the normal payment window open.
Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?
Posted: Thu Sep 10, 2020 12:27 pm
by dcrider
I may not have been clear in my original post. However, business requirements have changed negating my need for this solution.