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, ...
Answered

Call ER from code

(0) ShareShare
ReportReport
Posted on by

Is there any code sample somewhere how to call electronic reporting from code?
I have System.IO.MemoryStream object, but how could I use it and run a specific model mapping configuration on that stream (stream is created from XML file)? I saw that there is classes ERModelMappingDestinationRun*, but I am not sure how to use it.

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Check gerImportStatement method of BankStatementImportBatch class, it does exactly what you want. 

  • WillWU Profile Picture
    22,361 on at

    Hi Marija.todorovic,

    You can use the method like this:

    ERModelMappingDestinationRun::constructByImportFormatMappingId(<mapping id>, <integration point>).run();

    https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/er-apis-app73?toc=/dynamics365/commerce/toc.json

    Please have a look at ievgen's blog:

    https://ievgensaxblog.wordpress.com/2019/07/02/msdyn365fo-how-to-import-csv-file-using-electronic-reporting-part-5-run-import-from-x-code/

    Hope this helps.

     

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