Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

How to restore Created date field on Opportunity Entity from Non Prod instance

(2) ShareShare
ReportReport
Posted on by 13
Hi,
 
Can someone advice me on how to restore created date on the opportunity table from Non prod instance ? 
 
Context:
2000 opportunities were deleted from Production env, we managed to take a backup of the production env into non prod instance.
All those 2000 opportunities have been restored in production but created date has been updated with restore date. We need to restore the created date with the correct date from non prod instance. 
 
Can we restore created date on the opportunity table from non prod instance ? 
 
 
  • Suggested answer
    Dharanidharan Profile Picture
    621 User Group Leader on at
    How to restore Created date field on Opportunity Entity from Non Prod instance
    Yes, you can restore the Created On (createdon) date from your Non-Prod instance back to Production, but it requires a few specific steps because the createdon field is system-generated and normally read-only.
     
    Steps to Restore the Created Date on the Opportunity Table
    1. Export Opportunities from Non-Prod with Correct Created Dates
    • Go to Advanced Find in your Non-Prod environment.
    • Filter the Opportunity table to include only the 2000 records that were deleted from Production.
    • Include the following fields in the export:
    1. Opportunity ID (GUID)
    2. Created On (createdon)
    3. Any other relevant data
    • Export the results to Excel (CSV format).
    2. Enable “Created On” Field Update via API
    • By default, the createdon field is not updatable, but you can override it using the Dataverse API or Power Automate with XRMToolBox.
    3. Use Data Import with “Maintain Created On” Option
    • Go to Power Apps > Data Management > Imports.
    • When importing the modified file, use the “Maintain Created On” feature (only available via Data Import Wizard).
    4. Restore Created Date via XrmToolBox (Alternative Method)
    • Download XrmToolBox and use the Bulk Data Updater tool.
    • Map the createdon field from your CSV file to the Opportunity entity in Production.
    • Enable the “Allow Update on CreatedOn” setting before executing the update.
    5. Restore via Dataverse API (Advanced Option)
    • If XrmToolBox or Data Import Wizard doesn’t work, you can use Power Automate or a Console App with the CreateRequest message in Dataverse.
    Example using C# and Dataverse API:
     
    var opportunity = new Entity("opportunity");
    opportunity["createdon"] = new DateTime(2024, 03, 01); // Example date
    opportunity["name"] = "Restored Opportunity"; 
    var createRequest = new CreateRequest { Target = opportunity };
    service.Execute(createRequest);
    
    Hope this helps! Let me know if you need further details.
  • Verified answer
    Tom_Gioielli Profile Picture
    1,395 on at
    How to restore Created date field on Opportunity Entity from Non Prod instance
     
    The above is a SUPER old blog post, but the information is relevant and as far as I know it has not changed. To summarize, there is a security setting that allows users to override the Created On field with their own value. When this occurs, the system basically moves the current value into a field called 'overridecreatedon' so the information is preserved.
     
    So you should be able to replace or update the values with a System Admin security role. I would test on a few records and confirm the behavior before doing this in bulk. The article states using an export/import method, but I would think API/Workflow/DataFlow/Cloud flow might all work as well. 
     
    If this answer helps, please consider marking as verified

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,141 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,892 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans