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

Custom data entity virtual field not getting populated through postload method()

(0) ShareShare
ReportReport
Posted on by 50

Hi,

I am trying to import some csv data in d365 through a DMF project and have created my custom entity for this purpose . My target table contains a unique index which is a combination of (CustAccount and VendAccount columns) but in the source file I am not getting the VendAccount column. So , I have created a virtual column in my data entity and staging table named as vendAccount and trying to populate this column in the postload() method of the data entity . 

/// <summary>
///
/// </summary>
public void postLoad()
{
super();
this.VendAccount = AVAJurisdictionTable::getVendAccountFromJuristicion(this.Jurisdiction);
}

Now, for some reason I am not getting the values in the source buffer (this) as a result of which VendAccount never gets populated and the DMF execution fails on copying data from staging to target . Any ideas on how to bypass this issue ? 

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    postLoad() is used when loading entity data from database, i.e. on export.

    Use mapEntityToDataSource() for import. You can find an example in F&O documentation: Computed columns and virtual fields in data entities > Example: Use a virtual field to receive and parse an inbound field.

    By the way, please use Insert > Code (in the rich formatting view) to paste source code.

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 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans