You need to sign in to do that
Don't have an account?
Nathan Marchant
Display Images based on picklist field on Communities
Hi,
I am very new to devleoping in salesforce and i was hoping someone could point me in the right direction.
Basically on my community I want to display an image based on the value of a picklist field on account. For each selected value i want to display a different image. Does anyone know the best way of doing this?
Im am guessing building a Custom Visualforce page/componet is the way to go.
Maybe there is a way if doing this using HTML/Javascript
Sorry my question is so broad. Any help would be great.
I am very new to devleoping in salesforce and i was hoping someone could point me in the right direction.
Basically on my community I want to display an image based on the value of a picklist field on account. For each selected value i want to display a different image. Does anyone know the best way of doing this?
Im am guessing building a Custom Visualforce page/componet is the way to go.
Maybe there is a way if doing this using HTML/Javascript
Sorry my question is so broad. Any help would be great.
Try the below code.
Thanks.
Akshay
All Answers
The validation rule works in communities also. No need of creating additional components or VF pages for that.
You can try the below validation rules:
IMAGE(
Case(
Your_picklist_field__c,
"picklist_values_1__c", "Your URL field here",
"picklist_values_2__c", "Your URL field here",
"picklist_values_3__c", "Your URL field here",
"alt_image_url"
),
"picklist__c"
)
Try the below helpful reference:
https://help.salesforce.com/articleView?id=fields_useful_validation_formulas_community.htm&type=5
https://help.salesforce.com/articleView?id=customize_functions.htm&type=5#customize_functions
Thank you,
Ajay Dubedi
As this is a validation rule am I right in saying this means the image only shows when the user is interacting with this picklist field.
In my case I only want an image to appear when the user logs into the community. I dont was the user to be able to change or see any fields.
Thanks,
Try the below code.
Thanks.
Akshay