Notifications
Announcements
Hi, guys
i am trying to HCMapplicant form DataSource Methods it is possible to Override?
i wrote below the Syntax also i refer the blogs https://ievgensaxblog.wordpress.com/2018/01/10/d365foe-how-to-override-form-data-source-field-lookup-method/
[ExtensionOf(formDataSourceStr(HcmApplicant,HcmApplicant ))]static final class Applicant_Extension{
}
regards,
Riyas ahamed F
You can't override any methods with CoC, you can just enhance them with your additional code
Your CoC class should not be static. Check this doc page: docs.microsoft.com/.../method-wrapping-coc
Hi Riyas,Please refer to the following example that set a field not visable.You can change the datasource at 1 , and change the event at 2.Fds is instance of datasource. Or you can copy the event handler or method in the form like this.
Coc is also a good choice for you, please refer to the article: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/extensibility/method-wrapping-coc
What are you trying to achieve here?
Do you want to override the lookup method?
If yes, follow the blog post you referred.
Instead of an event handler you can use Chain of Commands (CoC) to register the method override.
CoC the init method of the data source and add the registerOverrideMethod code after next call.
CoC will not help on the lookup method itself, that is why you have to register override method. As wrapping the lookup with CoC will trigger standard functionality which will call the original lookup anyway.
Please be mores specific what are you trying to do as it is not clear.
Hi, Eveldas.
i need it FormdataSource methods override so that what to be done? also i am currently working on update 6 it is not supported COC
Update 6 has been out of support for a long time (1,5 years, April 2018). Why are you working on that version? No customer should be using that version.
Could you share your business requirement / functional requirement? Perhaps we can suggest a good technical solution for it. Overriding methods is not necessarily the solution that you need, and in most cases it's not possible. But you can hook into form data source events, as well as use Chain of Command on the data source methods.
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.
Abhilash Warrier 679 Super User 2025 Season 2
André Arnaud de Cal... 410 Super User 2025 Season 2
Martin Dráb 292 Most Valuable Professional