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 :
Service | Customer Service, Contact Center, Fie...
Answered

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

(3) ShareShare
ReportReport
Posted on by 20
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 ? 
 
 
I have the same question (0)
  • Verified answer
    Tom_Gioielli Profile Picture
    2,792 Super User 2025 Season 2 on at
     
    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
  • Suggested answer
    Dharanidharan Profile Picture
    638 Super User 2025 Season 2 on at
    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.

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 45 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans