Multiple Hook Requests

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Multiple Hook Requests

Post by dcrider » Thu Nov 19, 2020 9:29 am

I would like to request the following hooks:

Plugins.HookAddCode(this,"FormPayment.butCancel_Click_end");

Plugins.HookAddCode(this,"FormPayPlanCredits.butCancel_Click_end");

Plugins.HookAddCode(this,"FormPayPlanCredits.butOK_Click_end", _patCur, _payPlanCur, _listPayPlanEntries);

Plugins.HookAddCode(this,"FormPayPlanCredits.Load_end", _patCur, _payPlanCur, loadData);

Plugins.HookAddCode(this,"FormPaymentPlan.butOK_Click_end",PatCur,_payPlanCur,IsNew);

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Multiple Hook Requests

Post by joes » Tue Nov 24, 2020 9:30 am

These hooks should get implemented today. I do have one question about the last one you requested. We currently have "Plugins.HookAddCode(this,"FormPaymentPlan.butOK_Click_end",PatCur,_payPlanCur,IsNew);" in version 20.4. Will that one work for you where it is located?
Joe Sullivan
Open Dental Software
http://www.opendental.com

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: Multiple Hook Requests

Post by dcrider » Tue Nov 24, 2020 9:34 am

My apologies. I have two versions on my computer and I must have been looking at the older version. The one that is already in 20.4 is acceptable.

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Multiple Hook Requests

Post by joes » Tue Nov 24, 2020 2:30 pm

No worries. I just wanted to make sure that we have a hook that works for you. The four new hooks will be available in 20.4.24 when it is released. I had to change the order of your parameters in FormPayPlanCredits.Load_end to maintain the existing hook, so it was implemented as Plugins.HookAddCode(this,"FormPayPlanCredits.Load_end",_payPlanCur,_patCur,loadData);
Joe Sullivan
Open Dental Software
http://www.opendental.com

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Multiple Hook Requests

Post by jsalmon » Tue Mar 30, 2021 3:51 pm

dcrider,
I just overhauled the "Payment Plan Procedures and Credits" window (FormPayPlanCredits.cs) in the head (projected to be 21.2.1 ATM). The 'loadData' parameter that was being passed into the "FormPayPlanCredits.Load_end" hook no longer exists (I deleted both the field and the class it used). It has been replaced with an object that utilizes the PaymentEdit.ConstructResults class.
So the hook will now read like:

Code: Select all

Plugins.HookAddCode(this,"FormPayPlanCredits.Load_end",_payPlanCur,_patCur,_constructResults);
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: Multiple Hook Requests

Post by dcrider » Wed Mar 31, 2021 8:13 am

How different is the functionality?

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Multiple Hook Requests

Post by jsalmon » Wed Mar 31, 2021 1:28 pm

Functionality of the "Payment Plan Procedures and Credits" window - didn't change from the user's perspective.
Functionality of the HookAddCode() - only changed the 3rd parameter's type.
Functionality of the new PaymentEdit.ConstructResults Type - drastically different than the previous LoadData type.
^You'll want to revisit your implementation of this hook if you were heavily reliant on the LoadData parameter. We can talk about changing it depending on your needs, just let us know.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

Post Reply