DUB DYNAMICS CONSULTING
  • Home
  • Dynamics 365
  • The CRM Dev Hub
  • Contact Us
  • Mobile App Development
    • App Development
    • TGIF Fry Guide Support
    • TGIF Fry Guide Merch

Microsoft Dynamics CRM BLOGSPOT

Help! I've updated 5k Accounts with the same name and address

1/10/2022

0 Comments

 
Recently a client emailed in with an urgent message, "I have an issue that I need help with ASAP. I just did an update today that accidentally overwrote a bunch of accounts information and I wanted to know if there's a way to undo it.". After emailing back to get a better look at what actually had been updated, we determined that over 5,000 accounts had been updated with the same name, address, and other custom fields. This first illustrated the importance of having auditing turned on in your environments but also having someone experienced with data migrations importing data into CRM. There are a few tools out there currently, such as XRM Toolkit, that have a rollback tools that allow you to roll back an entity using the audit history records but these tools require you to have the GUID(unique identifier) and is not in bulk.

With it being 5k records needing to be rolled back, it wasn't realistic to do this account by account. What I ended up doing was created a console application that retrieved the effected accounts and their audit history. Then figured out old values vs new values and did the update. This took a little digging to figure out since it isn't very well documented by Microsoft how to get the audit history. Here is a partial code snippet. We used this console application to get all effected accounts updated with the original data and they couldn't have been happier with us. If this looks like a foreign language to you and you are in a same predicament give us a call! Or if you have questions on getting your audit history configured so you don't run into a situation where you are unable to rollback something that a user accidentally​ did.
C# Example

    
0 Comments



Leave a Reply.

    Categories

    All

    RSS Feed

  • Home
  • Dynamics 365
  • The CRM Dev Hub
  • Contact Us
  • Mobile App Development
    • App Development
    • TGIF Fry Guide Support
    • TGIF Fry Guide Merch