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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Override a method using a form extension class

(0) ShareShare
ReportReport
Posted on by 95

I am trying to override the modified, jumpRef, lookupReference function of a data field in a form extension class. This is what i tried to do.

[FormEventHandler(formStr(ProjFundingSourceDetail), FormEventType::Initialized)]
public void initializedFormHandler(xFormRun formRun, FormEventArgs e)
{
    FormDataObject shipToLogisticsAddressing = this.ProjFundingSource_ds.object(fieldNum(ProjFundingSource, ShipToLogisticsAddressing), 1);

    shipToLogisticsAddressing.registerOverrideMethod(methodStr(FormDataObject, modified), formMethodStr(ProjFundingSourceDetail, modifiedImplementation), this);
    shipToLogisticsAddressing.registerOverrideMethod(methodStr(FormDataObject, jumpRef), formMethodStr(ProjFundingSourceDetail, jumpRefImplementation), this);
    shipToLogisticsAddressing.registerOverrideMethod(methodStr(FormDataObject, lookupReference), formMethodStr(ProjFundingSourceDetail, lookupReferenceImplementation), this);
}

public void modifiedImplementation()
{
    // Custom Logic
}

public void jumpRefImplementation()
{
    // Custom Logic
}

public Common lookupReferenceImplementation()
{
    // Custom Logic
}

The 'lookupReferenceimplementation' is working fine and i am getting desired result. But while trying to modify or jumpref, i am getting the following error from UI.

"Error executing code: FormRun object does not have method 'jumpRefImplementation'." and "Error executing code: FormRun object does not have method 'modifiedImplementation'." 

Can anyone help me with this? Thanks in advance.

I have the same question (0)
  • Blue Wang Profile Picture
    on at

    Hi Muttakin,

    For which field do you need to override JumpRef ()?

    6507.PNG

    Please refer this blog: https://community.dynamics.com/365/financeandoperations/b/newdynamicsax/posts/code-behind-extension-forms-how-to-add-state-variable-and-override-methods-without-overlayering

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi muttakin,

    You have wrong signature of jumpref method, look at example I have in my blog post ievgensaxblog.wordpress.com/.../

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

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
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans