Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

ExportToPackage API -- reExecute field

(0) ShareShare
ReportReport
Posted on by 465

Hi,

When using data package api, I have a question about two fields that we pass in the body for "ExportToPackage" Api, which are "executionId" and "reExecute"

Based on what I noticed:

If I leave executionId as empty and reExecute as false, each time we call the api, a new record in the export job history gets created with a new executionId

However, if I pass the same executionId that i ran previously where reExecute is still false. It runs the same export job that has this executionId and without creating a new one.


My question is now, what's the benefit or reExecute here? what does it mean if it's false or true?  because if it's true or false it doesn't affect the result.

Also another question, in what case i will need to pass the same executionId and not create a new one?

  • D365FO user Profile Picture
    D365FO user 465 on at
    RE: ExportToPackage API -- reExecute field

    Hi Martin and Anitha,

    I have 5 points that i want to double check please:

    - So if ExecutionId is null , if reExecute is true or false it wouldn't matter, because we are creating a new exectutionId and the export process will start from scratch, right?

    - Now, if ExecutionId is filled. reExecute value will make a difference:

    • If reExecute is false, it's going to export the file again but using the same executionId. Which means that two steps that Martin mentioned will happen, right? I mean it's going to do the export from scratch by inserting to staging then to target. right?
    • If reExecute is true, then again it's going to export the file again but using the same executionId. However, this time it won't export from scratch and the file is already in staging and it's only going to map it to target, right?


    - So we can say that if i lost the exported file somehow, i can fill the executionId and put reExecute as true -- to be able to get the same exact file, right?

    - Now what would be the case where i use a new ExecutionId OR use the same ExecutionId but with reExecute as false, can someone tell me the difference here?  how can i tell if should do this or that?

  • AnithaEswaran Profile Picture
    AnithaEswaran 2,032 on at
    RE: ExportToPackage API -- reExecute field

    In case of export, if the execution id is provided and re-execute set to true , means the export file is not generated again . Same file will be used for exporting the data even if the user had made any changes to the values .

  • Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    RE: ExportToPackage API -- reExecute field

    I don't have anything more to say about ReExecute.

    But in general, the import process consists of two parts: The input file is parsed and data inserted to a staging table. In the second step, data is read from the staging table and a data entity is used to insert (or update) data to actual tables in F&O.

  • D365FO user Profile Picture
    D365FO user 465 on at
    RE: ExportToPackage API -- reExecute field

    Hi Martin,

    Can you please explain what's the difference between "importing to staging which then applies to target automatically" And "between applying to target which is when reExecute is true"

    Also in what case I would want to make reExcecute as true? Cause for repeating executionId, Anitha said it will be done in case of integration failure but what about making reExecute as true?

  • Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    RE: ExportToPackage API -- reExecute field

    Doesn't it mean that the repeats just the step applying staging data to target, not the import to the staging table?

  • D365FO user Profile Picture
    D365FO user 465 on at
    RE: ExportToPackage API -- reExecute field

    Hi Anitha,

    I read it already but I didn't understand it. What do they mean by target step

    "Set this parameter to True to run the target step. Otherwise, set it to False"

  • AnithaEswaran Profile Picture
    AnithaEswaran 2,032 on at
    RE: ExportToPackage API -- reExecute field

    Hi,

    learn.microsoft.com/.../data-management-api

    This link gives an explanation of Reexecute.

    If there is integration failure , the existing execution id can be used for export rather than creating a new one.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans