I need to upload an Excel file on an opportunity. I want to user ContentVersion standard object to store these excel files.
Can anyone please explain or share a code snippet to show how can we upload an excel to an ContentVersion object and how to associate the uploaded record with an opportunity?
can you please also explain difference between ContentVersion and ContentDocument objects?
Thanks in advance