function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
alex_from_75015alex_from_75015 

Display on same "table" data from Lead and Contact

Hello

Is there a best practices to perform instead of apex:repeat ?

Class wrapper or something like that ?

Thanks for your advice

Regads

SamuelDeRyckeSamuelDeRycke

Yes, if you make a container class in apex, you can iterate repeater over a list of container objects.

alex_from_75015alex_from_75015
Hi Can you write me apex structure of such container, please (for Lead or Contact to display in apex:table) ? Thanks Regards Alex
SamuelDeRyckeSamuelDeRycke

I could .... but I'd prefer you gave it a try yourself. try declaring a class in apex with a contact and a lead as properties.  And displaying a list of those objects in a repeater.

 

Post your code when you get stuck, and I or someone else will help from there on.