Method Overwrite

For users or potential users.
Post Reply
jaynahar
Posts: 40
Joined: Wed Apr 23, 2014 6:35 am

Method Overwrite

Post by jaynahar » Tue Mar 10, 2015 4:36 am

Hi All,

I want to over write the ok button click event of contact edit form. How can i do this? Any help with sample code will be helpful.

Please help me.

thanks in advance

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

Re: Method Overwrite

Post by jsalmon » Tue Mar 10, 2015 9:20 am

You'll want to get familiar with our plugin framework first:
http://www.opendental.com/manual/plugins.html

Then, once you've got the sample compiling and working, you can submit a plugin / hook request on our Developers forum thread for the Contact Edit form that best helps the plugin you are trying to create:
http://www.opendental.com/manual/patternplugins.html
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

jaynahar
Posts: 40
Joined: Wed Apr 23, 2014 6:35 am

Re: Method Overwrite

Post by jaynahar » Wed Mar 11, 2015 6:42 am

Hi All,

Thank you for your reply.

I am using the below code but it is not working. Please guide me what i am doing wrong in it.

public override bool HookAddCode(object sender, string hookName, params object[] parameters)
{
try
{
switch (hookName)
{

case "FormContactEdit.Load_end":
MessageBox.Show("inside contact edit in plugin");
return true;
default:
return false;
}
}
catch (Exception pcex)
{

return false;
}

}

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

Re: Method Overwrite

Post by jsalmon » Wed Mar 11, 2015 8:02 am

That's because there is no such HookAddCode called "FormContactEdit.Load_end". You need to make a hook request for us to create it for you. Heed the second part of my post where I tell you to submit a hook request to the Developers forum:
jsalmon wrote:Then, once you've got the sample compiling and working, you can submit a plugin / hook request on our Developers forum thread for the Contact Edit form that best helps the plugin you are trying to create:
http://www.opendental.com/manual/patternplugins.html
We also mention this in our Plug-in Framework page:
Patterns
Our programmers add all requested hooks. We have documented very specific Plug-in Patterns that we will follow when adding hooks. Users requesting hooks must understand these patterns in order to intelligently make hook requests.
http://www.opendental.com/manual/plugins.html
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