You need to sign in to do that
Don't have an account?
NARESH DEVARASETTI
ContentVersion is getting save in notes and attachments not in files when insert from visualforce page
Hi,
I am facing an issue with the contentVersion. When I am inserting the contentVersion record from visualforce page action to attach the another VF page as pdf. Its getting attached in notes & attachment related list but I want to add that in files related list.
Please help here
Your ask seems similar to https://salesforce.stackexchange.com/questions/238009/upload-attachments-to-files-related-list-using-apex
"Like the option says it attaches files only when its uploaded from related list(Only from the standard related list UI). From apex you're supposed to insert a contentDocument, which is a salesforce file but what you're attaching is just an attachment. Salesforce doesn't automatically convert attachment into a file. You need to insert a file explicitly!"
You might want to try the approach of using trigger on Attachment, with a Before and After, to move attachments over to files.
Related:https://salesforce.stackexchange.com/questions/122301/migrate-attachments-to-salesforce-files
https://douglascayers.com/2015/10/10/salesforce-convert-attachments-to-chatter-files/
If this information helps, please mark the answer as best. Thank you
We are aleady using contentVersion and contentDocumentLink to save the file but instead of getting saved in files it is getting saved in both notes & attachments and files.
Is there any way to get rid off not saving in notes & attachments?