• NebexForce
  • NEWBIE
  • 0 Points
  • Member since 2010
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

I have the below piece of Code to display Related Contents of an Account record on a visualforce page as a related List in attempt to replace the Standard Related Content related list and hide the action links on it, but it seems that I can't get the relationship query right on ContentDocumentLink!

Is there any other way to do this? Help Please…

 

acc = (Account)controller.getRecord();

List<Account> account = [select Id,Name from Account where Id=:acc.Id];                                                                                                                          

ContentLinks = [Select Id, SystemModstamp, ShareType, LinkedEntityId, IsDeleted, ContentDocumentId From ContentDocumentLink where LinkedEntityId=:acc.Id];

//ContentLinks comes up empty as the relationship (LinkedEntityId=:acc.Id) is not working

 

if(ContentLinks.size() > 0){

  for(ContentDocumentLink cdl : ContentLinks) dIds.add(cdl.ContentDocumentId);

}               

contentVers = [Select Id, Title, ContentSize, ContentDocumentId, LastModifiedDate,CreatedDate From    ContentVersion where AND ContentDocumentId IN:dIds];

I have a List of type custom class,  what i want is for the StandardSetController object to take this list instead of the List that am gonna get from the database. Is this in anyway possible? 

I have the below piece of Code to display Related Contents of an Account record on a visualforce page as a related List in attempt to replace the Standard Related Content related list and hide the action links on it, but it seems that I can't get the relationship query right on ContentDocumentLink!

Is there any other way to do this? Help Please…

 

acc = (Account)controller.getRecord();

List<Account> account = [select Id,Name from Account where Id=:acc.Id];                                                                                                                          

ContentLinks = [Select Id, SystemModstamp, ShareType, LinkedEntityId, IsDeleted, ContentDocumentId From ContentDocumentLink where LinkedEntityId=:acc.Id];

//ContentLinks comes up empty as the relationship (LinkedEntityId=:acc.Id) is not working

 

if(ContentLinks.size() > 0){

  for(ContentDocumentLink cdl : ContentLinks) dIds.add(cdl.ContentDocumentId);

}               

contentVers = [Select Id, Title, ContentSize, ContentDocumentId, LastModifiedDate,CreatedDate From    ContentVersion where AND ContentDocumentId IN:dIds];

Hi,

 

I am making a callout to external webservice and getting following exception.

 

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element ProposalInfoOut

 

I guess i am able to make callout and also getting response but salesforce not able to parse response.

Please help and tell me where is the problem or am i misiing something..?