Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

What is the use of re-execute in ExportToPackagePreview API.

Posted on by 12

Hi Team,

 

I'm using the D365FO ExportToPackagePreview API, and I want to
understand the purpose of the 're-execute' parameter in the API. Will it
be used for creating a new executionId if the previous execution fails,
or can it be used for an existing executionId as well? What happens in
the background if we set it to true?

link: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-management-api#exporttopackage

  • Layan Jwei Profile Picture
    Layan Jwei 7,347 Super User 2024 Season 2 on at
    What is the use of re-execute in ExportToPackagePreview API.
    Hi QA-Microsoft,

    The question  was about re-Execute in ExportToPackagePreview, so if you think your question is answered, then please verify the answers that helped you, by clicking on this tickBox under each answer that you think was helpful and answered your question.


    If you are facing difficulties on how to import, then please create a new question and we'll be happy to help. Just so that we stay in context, and it will help others to stay to find their answers about import. In general you can check the Microsoft documentation about import 
    https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-management-api#importfrompackage
    Also we need to know how did you call the import exactly, what did you fill in the body to understand why it didn't work

    Thanks,
    Layan Jweihan
  • QA-Microsoft Profile Picture
    QA-Microsoft 12 on at
    What is the use of re-execute in ExportToPackagePreview API.
     a
     
    Hi Layan,
     
    Thank you for the response, but can you elaborate it please.
     
    When I send execute=false, the import process is not getting started and I don't see the created executionID in the Job History tab of Finance and operations.
     
    So not understanding the exact use of it. When execute=false, then we could able to generate execution ID using below api. And how this executionID be used next?
     
    /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ImportFromPackage
     
    Do we need to use this for next import operation? If yes, do we need to call the "data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetAzureWriteUrl" api again and upload the data to it or not?
     
    Thanks
     
  • Layan Jwei Profile Picture
    Layan Jwei 7,347 Super User 2024 Season 2 on at
    What is the use of re-execute in ExportToPackagePreview API.
    Hi QA-Microsoft,
     
    It means the same, it doesn't import to the staging from scratch, it rather repeats applying the already existing data in staging table to the target.
     
    If your question is answered, then please verify the answers that helped you.
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • QA-Microsoft Profile Picture
    QA-Microsoft 12 on at
    What is the use of re-execute in ExportToPackagePreview API.
     
    Thank you for answering For Export operation.
     
    I do see, similar option called "Execute" in Import as well. May I know the use of this?
     
    Thanks.
  • QA-Microsoft Profile Picture
    QA-Microsoft 12 on at
    What is the use of re-execute in ExportToPackagePreview API.
    Andre Arnaud de C  here what is mean the target step?
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,347 Super User 2024 Season 2 on at
    What is the use of re-execute in ExportToPackagePreview API.
    Hi service account,
     
    In general when you export(without skipping stagging table), maybe you could say data is exported to a staging table before it gets transferred to a file format.
     
    Now, no re-execute won't be used for creating a new executionId as far as I understand. If you leave the executionId empty when exporting, then this alone will create a new one.
     
    Now if let's say you fill an existing executionId (which means staging table is already filled) and you put re-execute as true, this means no need to first export data again to staging table , just take the existing data in staging table and transfer to the file. If re-execute is false, then I think it will export to staging table again then transfer it to a file.
     
    This is my understanding for it. You could also play with these values and see it's effect yourself to verify what happens exactly
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    What is the use of re-execute in ExportToPackagePreview API.
    Hi,
    A re-execution function or parameter, usually used to handle the failure or partial failure of a previous operation. When you try to create a data package, network problems, data inconsistencies, operation timeouts, etc. may cause the operation to fail. You can check the documentation provided by Andre, it mentions the relevant code logic.
    Best Regards,
    Hana

     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,269 Super User 2024 Season 2 on at
    What is the use of re-execute in ExportToPackagePreview API.
    Hi Service Account QA-Microsoft,
     
    This parameter is used to enable or disable the option to run the target step. You can read more about this here: Data management package REST API - Finance & Operations | Dynamics 365 | Microsoft Learn

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans