You need to sign in to do that
Don't have an account?
Chris Marzella
Scale A Formula Using Apex
I am looking for a way to get a contact image into the detail page, but I need something that can scale to thousands of contacts. The below formual works for a small amount of records, but this will quickly become unmanageable. Would Apex be the best route and how would I accomplish this?
IMAGE( CASE( Name, 'Jeff May', '/servlet/servlet.ImageServer?id=01590000000rZ17', 'Steve Molis', '/servlet/servlet.ImageServer?id=01590000000rZ18', 'Geoffrey Flynn', '/servlet/servlet.ImageServer?id=01590000000rZ19', '/img/s.gif' ), 'Contact Logo' )
If it's regular apex/VF page, it depends on where the data reside, if it is in the DB you can create function to return the ID given name using SQOL select id from .... where name ='Jeff May';
if it's something you need to manual entered, you can consider manually creating a map object or something similar to store the data.
thx
thx.
have an image ID field (Say Image_Id__c) on contact which will contain image ID for that contact and use image formula field like IMAGE('/servlet/servlet.ImageServer?id=' & Image_Id__c)