What is Personalization ?
Sometimes Visualforce page needs to behave or look differently for different set of users. This is called Personalization.How do achieve this ?
In salesforce, we can use 'Custom Settings' to store the personalization data for User, Profile or entire Organization. We need to be very careful in not misusing this. If any data that does n't different between user, then it's App Configuration which should be stored in 'Custom Metadata'.Where is the Code ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page > | |
<apex:sectionHeader title="Styling based on User Configuration"/> | |
<!-- Show a text with Color, Configured for ORG --> | |
<apex:outputText value="My Sample Text" | |
style="color:{!$Setup.TestSettings__c.Color__c};font-size:{!$Setup.TestSettings__c.Size__c}px;"/> | |
</apex:page> |
No comments:
Post a Comment
Thanks for reading my blog !