+ Start a Discussion

How to create records from CSV file in visualforce?

I am trying to implement the following list to create record from csv file.
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) 

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