You need to sign in to do that
Don't have an account?

Save csv file in Document object through Visualforce page
Hi,
I want to create a visualforce page from where I select a csv file and upload into salesforce Document object.
Then from document object I need to read the uploaded file and insert into a custom object.
Please provide suggestions.
Thanks!
I want to create a visualforce page from where I select a csv file and upload into salesforce Document object.
Then from document object I need to read the uploaded file and insert into a custom object.
Please provide suggestions.
Thanks!
http://blog.jeffdouglas.com/2010/04/28/uploading-an-attachment-using-visualforce-and-a-custom-controller/
If you have Notes and Attachments as a related list on the Custom Object, you can use the Id of the Custom Object's record as a Parent Id for the Attachment and it should show up automatically when you view the particular record. Even if you dont have a tab for the Custom Object, you can still use the Custom Object's Id as the ParentId of the attachment (Code is available in the link I gave above).
Let me know if it helps.
My next requirnment is to read the csv file saved in the attachments and insert records in a custom object.
please suggest!
Thanks!
http://www.forcetree.com/2010/08/read-and-insert-records-from-csv-file.html
http://www.sfdcpoint.com/salesforce/import-csv-file-using-apex-visualforce/
Database.insert();