Notifications
Announcements
No record found.
Hi,
As we know that CoC not supported Private method . If required to use Private method in CoC, then we need to raise " Extendibility service request " to MS.
Is it same concepts for any methods like which is private in entire applicaton, if required to add or modify some code then required to contact MS or is this only for COC?
Please give me more shed on this
Hi Arpan,
Apart from using CoC, the only option is to "Copy event handler methods". That is not possible for protected and private methods until and unless the method has been marked with Hookable(true) or if it has a delegate.
For an example, you can check the method getRemainBeforeQty in class SalesFormLetter. It has a delegate defined which can be used for some modifications.
Hi @rp@n,
Methods that are declared as private can be called only from methods in the class where the private method is declared.
So, you cannot create event handlers or use CoC to customize private methods simply. You need to raise " Extendibility service request " to MS.
About mentioned Hookable , check your old thread: community.dynamics.com/.../851612
Thanks Gunjan and Blye,
Apart from CoC, If we need to required to add or modify any ( Private or Protected methods )then the Hookable attribute should be TRUE like
HookableAttribute(true), Then only we can proceed further in to those methods...
Is it right?
If you can customize the method, you can make it hookable.
Another way is to use reflection, but not recommended. Just know.
Because once Microsoft changes this private method, your code will be useless.
If you are sure that you need to modify this private method, it is best to apply for extensibility.
Can you tell us why you need to modify private methods?
You can add private methods in the same way as non-private methods. Regarding modifying, you can modify your code but not standard code, and it has again nothing to with the access modifier.
The Hookable attribute is used for extensions, not for adding and modifying methods.
Hi.all,
It's not my requirement. I am just asking for the best approach to do modification if required.
That's it
I believe we've covered the topic. If there is something you still don't understand, read the answers once more and if it doesn't help, explain your actual problem. Just saying "It's not my requirement" doesn't allow us to help you.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 503 Most Valuable Professional
André Arnaud de Cal... 434 Super User 2025 Season 2
BillurSamdancioglu 278 Most Valuable Professional