Sorry if this seems easy, but I am new to Salesforce...
What I did so far is:
- Query files using apex
- Do operations according to VersionData of queried files
Everything works as expected. However, when a different user triggers the operation to fetch the files, he can not access my library. How can I create the files so that all users can access them or how can I access higher level users library?
Thanks in advance!
ContentVersion contentVersion_1 = new ContentVersion( Title = 'some title', PathOnClient = 'some title'+'.txt', VersionData = Blob.valueOf('some content to access later on'), IsMajorVersion = false /*so that can be updated later on*/ ); insert contentVersion_1;
List<ContentVersion> jsonFiles=[select Title, VersionData from ContentVersion where Title='some title'];