web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Data import from excel

(0) ShareShare
ReportReport
Posted on by 5

For some reason, when I attempt to import data from an excel that was previously exported; for best practices. It gives me an error code  -2,147,158,525  and all I did was change some values to see if it would take back import. I do not know what else to do... Please help!

I have the same question (0)
  • Mikeinator1st Profile Picture
    20 on at
    RE: Data import from excel

    I tried this, however, deleting columns A thru C resulted in new records being created instead of revising the existing ones.

  • Neeraj Pawar Profile Picture
    on at
    RE: Data import from excel

    Glad I could be of some help :)

  • Carlos Q Profile Picture
    5 on at
    RE: Data import from excel

    Hello Neeraj,

    First of all; I am very grateful for your help given and allow me to inform you that:

    1. This link was great and very useful (docs.microsoft.com/.../dynamics_error_codes)

    2. The use of the csv file workaround worked fine.

    3. I am taking all your suggestions about duplicates and unique columns' values into consideration when errors appear.

    So I made all the fields as optional in order to not have to fill all the values on the excel to be imported and have the ability to just work with the fields that were not causing errors and that is what I am doing now... meaning that, some testing is being done.

    Sincerely,

    Carlos Q.

  • Verified answer
    Neeraj Pawar Profile Picture
    on at
    RE: Data import from excel

    This issue usually occurs when we have a lookup field in import file and the target entity of that lookup has multiple records with same name. Below is the repro to explain this scenario better.

     

    Below is the import file which has lookup fields "Potential Customer" and "Account".

    1803.pastedimage1576579063064v1.png

    After importing above data, system throws below errors in Transform phase since the both lookups target to entity "Account" and this error means that the account entity has multiple records with the same name "Test". (Column Heading and Column Value fields would let you know the affected lookup and duplicated record name)

    2781.pastedimage1576579083123v2.png

    In UI, for the same field when you enter "Test" and search, all the accounts with name "Test" would be shown for you to select and proceed further, but in the data import scenario when the system gets more than 1 result for a particular record it will not be able to conclude which is the right record to be used and throws an exception.

    5861.pastedimage1576579103263v3.png

    To fix this, you can follow any of the below approaches.

     

    1. Make sure lookup's target entity does not have multiple records with same name, if its possible rename the duplicate ones.
    2. If lookup's target entity needs to have multiple records with same name then we have to find an unique field from the target entity and modify the import file so that we can use the unique field's data, and during the data import we can change the lookup mapping so that the unique field is considered. Below are the steps.

     

    a. In my scenario I have Account Number field which is unique in Account which is targer entity of the lookup, I can now use this field in the lookup mapping during the import. 

    8585.pastedimage1576579724640v13.png

    b. Modify the import file so that the lookup fields would have the unique column's value. (Account Number)

    5126.pastedimage1576579759842v15.png

    c. Now during the import we can configure the mapping for the lookup field so that it uses the unique field as well. Follow step 1, 2 and 3 from below image. 

    7652.pastedimage1576579781985v16.png

    d. Complete the import and now the data should be imported. 

    Please let me know you have any queries on this. :) 

    Thanks,

    Neeraj Pawar

  • Carlos Q Profile Picture
    5 on at
    RE: Data import from excel

    Hello Neeraj,

    I did as you said... Thank you so much for your time; the only thing is that now is showing another error :(

    " -2147220654 A duplicate lookup reference was found" and I am allowing duplicates... I am literally doing just minimum editing. I also went to data management and tried from there, making sure duplicates are allowed. Played with it, but no luck yet my friend...

  • Verified answer
    Neeraj Pawar Profile Picture
    on at
    RE: Data import from excel

    Error code -2,147,158,525 denotes that the original record does not exist in CRM.

    Reference: docs.microsoft.com/.../web-service-error-codes

     

    Information of the older records are stored in the column A, B and C in exported excel file and these columns are hidden by default.

    1261.pastedimage1576491173056v2.png

    Kindly try the below workaround and let me know if this helps. 

    1. Open the excel file and save it as a CSV file. 

    (File > Save As > File type : CSV (Comma Delimited) (*.csv))

    4341.pastedimage1576491240044v3.png

    2. Open the newly saved CSV file, select all columns, right click on the column heading and select Unhide option.

    2337.pastedimage1576491292196v4.png

    3. Delete the columns A, B and C which has (Do Not Modify) text.

     3146.pastedimage1576491360362v5.png

    4. Save the file.

    5. Go to CRM and import the CSV file using “Import from CSV” option. Keep the default delimiter settings and map the required fields if not already mapped and submit the import.

    6305.pastedimage1576491428562v6.png

    This should let you import the data back to system. There is a possibility that you may hit -2147220650 error which usually occurs due to formatting mismatch between the import file and CRM, this can be fixed by validating the formats in both sides and avoid the columns like Created On and Modified On in the import file.

    Please let me know if you have any queries on this.

    Thanks,

    Neeraj Pawar

  • Carlos Q Profile Picture
    5 on at
    RE: Data import from excel

    Hello Goutam,

    That's exactly what I did with the excels templates and unfortunately, none of the options worked. I wonder if it has to do with the fact that I created these entities?

    Here are some details, but not sure if these are the ones because on the "failures tab / Import logs" it shows that record (the testing one) that failed with error code "-2,147,158,525 " I click on it and it takes me to the detail below. I basically created a record; exported the excel and then just edited a value like instead of 100 to  50 just to see if at least that would work, but it would not take it back.

    Something has gone wrong. Check the technical details for more details.

    Technical Details

    Session Id: cb488956-5c2f-4850-ba77-c6a82c6c9dc2

    Activity Id: 501511c4-8520-46da-b778-9e17e7a50df9

    Timestamp: Fri Dec 13 2019 21:58:52 GMT-0600 (Central Standard Time)

    Form descriptor is null or not defined

    UciError: Form descriptor is null or not defined at i (ar.crm.dynamics.com/.../app.js at new m (ar.crm.dynamics.com/.../app.js at ar.crm.dynamics.com/.../editformpage.js at Object.execute (ar.crm.dynamics.com/.../editformpage.js at ar.crm.dynamics.com/.../app.js at new Promise (<anonymous>) at S._executeAsyncAction (ar.crm.dynamics.com/.../app.js at S._executeAsync (ar.crm.dynamics.com/.../app.js at S.executeAction (ar.crm.dynamics.com/.../app.js at t.dispatch (ar.crm.dynamics.com/.../app.js

    Thank you so much for your time,

    Carlos Q

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Data import from excel

    Hi,

    Please share error details. As you said the excel was previously exported , if its backup purpose you can delete all the existing record and re-import again.Another options would be download the import template and fill the data for import.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
DAnny3211 Profile Picture

DAnny3211 134

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 115

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans