+ Start a Discussion
TanDTanD 

How to create records from CSV file in visualforce?

I am trying to implement the following list to create record from csv file.
http://www.forcetree.com/2010/08/read-and-insert-records-from-csv-file.html
User-added image
But, when I am trying to implement, an error has occured reading the CSV file - invalid id. 
I am successfully created RECORDS in a org by same code. But, when I am trying to implement the same code & same csv file in my 2nd SF org, it is throughing the error. I have checked all typos. No typo, no error in VF or Apex class. 
What could be the reason of this error? 
SandhyaSandhya (Salesforce Developers) 
Hi,

Check if you are mapping fields properly.As mostly this error occurs when you are mapping some string fields to id fields.

Hope this helps you!

If this helps you please mark it as solved.

Thanks and Regards
Sandhya