function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
List<contentDocumentLink > listCDL = [ SELECT ContentDocumentid, LinkedEntityid FROM contentDocumentLink WHERE LinkedEntityid = 'a091C00002EQnnT']; Set<Id> setContentDocumentIds = new Set <Id>(); for( contentDocumentLink rec : listCDL ){ setContentDocumentIds .add(rec.ContentDocumentid); }
List<ContentVersion > listContentVersion = [SELECT Id FROM ContentVersion WHERE ContentDocumentId IN :setContentDocumentIds];
To get attached file refer to ContentDocumentid . Use the below SOQL query. To get the content version you can further use :