web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to trigger form dataSource methods on D365FO.

(0) ShareShare
ReportReport
Posted on by 1,215

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

I have the same question (0)
  • Verified answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    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

  • Verified answer
    MATTGUO Profile Picture
    22,349 Moderator on at

    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.
    0081.png
    Or you can copy the event handler or method in the form like this.

    48185.png

    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

  • Evaldas Profile Picture
    1,800 on at

    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.

  • Riyas ahamed F Profile Picture
    1,215 on at

    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

    regards,

    Riyas ahamed F

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    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.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 679 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 410 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 292 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans