+ Start a Discussion
Swamy PSwamy P 

How to insert contact records by assigning account name

Hello Users,

I have to insert 50000 contacts into my Contact object.But we are having account lookup in contact object, i have only account name in the excel sheet.

So in seperate excel sheet i just exported id, name from account. Now i cannot compare manually the this name in another excel sheet for association of record id. By using some formulaes we can achieve this functionality.

Can anyone suggest me the solution to place the id's instead of name. 

Thanks in advance!!
KaranrajKaranraj
Using VLOOKUP funcrtionality in excel sheet you can able to day.
  • Export Name and Id from the account object keep it sheet1
  • Keep all your Contact data in the sheet two
  • Now create a VLOOKUP formual in the sheet2 to match the Account name from sheet2 to Name in Sheet2 to get the AccountID in contact data sheet
  • Now remove the Account Name column from the sheet2 [ Do some random verification to check the vlookup is working fine]
  • Using apex Dataloader, now you can able to import the contact data into salesforce org 
Here is link to know more about VLOOKUP functioanlity in excel sheet - http://www.addictivetips.com/microsoft-office/vlookup-function-in-excel-2010/
Andries.NeyensAndries.Neyens
If the account names are unique (probably not), you could put them in an External ID text (temporary) field on account level.
Afterwards you could use the dataloader to use this external id to connect the contacts to the correct account.