For a custom object , we have a lookup field Account which will be holding the id of the Account which the user will be selecting .

We need to import data from a 3rd party where the Account field is text .

How to insert such data?

  • 1
    what exactly do you mean by 'the Account field is text'? Can you provide a small sample of the data to be imported? – Guy Clairbois Sep 16 '16 at 13:19
  • you have account name in that text field or account id? – Himanshu Sep 16 '16 at 13:19
  • e.g In Salesforce , the Account field is a Lookup one . But in the data , Account field is text . Like ABCD – SFDCRookie Sep 16 '16 at 13:28
  • Should I get the Account ids first , put it in this sheet and then insert? – SFDCRookie Sep 16 '16 at 13:28
  • you can try the Dataloader.io. In this tool they provide option to match parent using any parent object field. – Tushar Sharma Sep 16 '16 at 14:08

Data Loader Option

  1. Create a report in Salesforce of the Account Names (or whichever field you are going to match on) and Id then export to Excel.
  2. Import this into excel as one sheet in the workbook, sort these by the acccount name or other field you will be using for matching.
  3. Create a separate sheet with the external data and then create a Vlookupfield to the sheet containing the Salesforce data and id, returning the column value for the id.
  4. Export this sheet with the external data to a .csv file and load to Salesforce using Data Loader.

Data Loader Documentation


Simple Option use Import Wizard

The Data Import Wizard will allow you to match Salesforce fields using text values, e.g. account name, rather than the Id. See the image below though there I am matching user rather than account name the principle is the same.

Data Import Wizard

Setup>Administration>Data Management>Data Import Wizard

This will work better if you have less than 50,000 records to import or can batch them up.

Data Import Wizard help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.