I want to create an overview of a list which contains content from different objects. I will try to add in this list the files, tasks, events, emails and notes. I would like to show this list on the account or contact record so that the sales representative can get a quick overview of the correspondence. I know how can I store all information of different objects in one list, but how can I display this list in a visualforce page?

sObject[] results = new sObject[0];
results.addAll([SELECT Title FROM ContentDocument]);
results.addAll([SELECT Subject FROM Task]);
results.addAll([SELECT Subject FROM Event]);
results.addAll([SELECT Subject From EmailMessage]);
results.addAll([SELECT Title FROM Note]);

1 Answer 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .