Page 1 of 1

Make FillCharges method public

Posted: Wed May 26, 2021 4:28 pm
by dcrider
Would it be possible for OpenDental.FormPayPlan.FillCharges() to be changed from private to public? One of our plugins overrides the default FormPayPlanChargeEdit with a custom one and I've noticed that I need to call FillCharges() in order for the UI to update after a change.

I currently use the following code, but I would like to be able to just call _FormPayPlan.FillCharges();

Code: Select all

_FormPayPlan.GetType()
    .GetMethod("FillCharges", BindingFlags.NonPublic | BindingFlags.Instance)
    .Invoke(_FormPayPlan, new object[] { });

Re: Make FillCharges method public

Posted: Wed May 26, 2021 4:39 pm
by dcrider
I would also like OpenDental.ControlAccount.ToolBarMain_ButtonClick to become public as that's the best way I've found to start the payment process using your existing code.

Basically, we have a process to walk our patients through financing options and at the end they can make a payment. So on our form we have a "Make a Payment" button that programmatically clicks your Payment button through the method above.

Re: Make FillCharges method public

Posted: Wed May 26, 2021 10:43 pm
by jordansparks
Wow, you're really getting deep into it. Our policy in cases like this is usually to just leave it alone and you can use reflection to do it, just like you are.

Re: Make FillCharges method public

Posted: Thu May 27, 2021 7:48 am
by dcrider
I figured it would be a long shot, but thank you for the response.

That's pretty surface-level for most of our plugins. We really like being able to customize every bit of the workflow with plugins. We have over two dozen centers across 4 States, so deep customization is important to us.