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

The xml file generated from code for DMF export does not have any data

(0) ShareShare
ReportReport
Posted on by 451

Hi All,

I have written a code to export the xml based on DMF project on click of a button (PO Confirm).

I have written the code which is giving me the successful execution with staging data populated but when i download the file its giving no data.

Can you pls  help me understand what am I missing here.

3021.code.JPG

Thanks !!

I have the same question (0)
  • GirishS Profile Picture
    27,827 Moderator on at

    Hi AX Dev,

    I think you are calling the exportToPackageV2 method which will download as a package.

    Try using exportToFileV2 method to export data into file.

    Thanks,

    Girish S.

  • Dev Profile Picture
    451 on at

    Girish, this method is internally called after exportToPackageV2 and still the data is missing.

  • GirishS Profile Picture
    27,827 Moderator on at

    Hi AX Dev,

    Please go through the class "BankPositivePayExport" - generatePositivePayFile(Method name).

    In that class they will initialize the data entity by adding query ranges and call the "DMFEntityExporter" class to send the file to user as a XML format.

    So please compare your class with that standard class and check for difference.

    Thanks,

    Girish S.

  • Dev Profile Picture
    451 on at

    Hi Girish,

    generatePositivePayFile calls exportToFile which is also getting called from the base method exportToPackageV2 which later calls exportToFileV2.

    I have compare to the manual process the file execution is successful with staging data but when I download file from the execution it has no data just the xml tags.

  • GirishS Profile Picture
    27,827 Moderator on at

    Hi AX Dev,

    Can you check the below URL. Send the file directly to the user using "File::SendFileToUser" instead of donwloading file from the data management execution job.

    https://community.dynamics.com/ax/b/shabibax/posts/export-data-entity-through-code-dynamics-365-finance-and-operations-x

    Thanks,

    Girish S.

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans