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 :
Dynamics 365 Community / Forums / Finance forum / Form data field event ...
Finance forum

Form data field event handler

(0) ShareShare
ReportReport
Posted on by 313

Hi,

I am using form data field event handler. Here how can i call data source methods and form methods. please suggest me.
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormDataFieldEventHandler(formDataFieldStr(PurchTable, PurchLine, itemBarCode), FormDataFieldEventType::Modified)]
public static void itemBarCode_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
{
FormDataSource purchLine_ds = sender.datasource();
PurchLine purchLine = purchLine_ds.cursor();

}

Thanks,

I have the same question (0)
  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    From sender you  can get formrun and call form method. You already got the formdatasource so you can call method from  datasource as well.

  • Prabakaran.R Profile Picture
    313 on at

    Hi Sukrut,

    Thanks for your suggestions, But it is not working I tried like that

    sender. formmethods and same way purchline.datasource method unfortunately am getting error like that. please suggest me anything i did wrong.

    " class does not contain method: the Purchline does not contain a definition for method itemidmodified and no extension method itemidmodified accepting a first argument of type purchline is found on any extension class".

    Thanks, 

    Prabakaran R.

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    Do you have proper  references  set to your model? Method you are calling is standard so I think references are not set  properly.

  • Prabakaran.R Profile Picture
    313 on at

    Hi Sukrut,

    Thanks for your reply, It is a standard method only.

    Thanks,

    Prabakaran R.

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    Did you check if you have proper references ? Is your problem resolved?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans