Posts

Custom Favicon on your Experience Cloud Site or Force.com Site

Image
About Favicons: The icon displayed on the browser's address bar/ tab or when the page is bookmarked is called the favicon. Resources to be used as a favicon (favorite icon) has to be 16x16 in size and of .ico format.  There are multiple ways of specifying a favicon for a website and the standards are listed here: 1. Use of a rel attribute value defined in a profile 2. Putting the favicon at a predefined URI on the root path. Favicon requests are sent by the browser and how it resolves to any of the methods above is specified here: QUOTE : "If links for both PNG and ICO favicons are present, PNG-favicon-compatible browsers select which format and size to use as follows. Firefox and Safari will use the favicon that comes last. Chrome for Mac will use whichever favicon is ICO formatted, otherwise the 32×32 favicon. Chrome for Windows will use the favicon that comes first if it is 16×16, otherwise the ICO. If none of the aforementioned options are available, both Chromes will use ...

User and System Mode in Salesforce

User Mode: When an Apex class executes in user mode, it runs with the permissions and privileges of the current user who initiated the operation, also known as the executing user. In user mode, Apex code adheres to the organization's sharing rules, field-level security (FLS), and other user-specific permissions and settings. The visibility and access to records and data are determined by the security settings and permissions assigned to the executing user, including their role, profile, permission sets, and sharing settings. User mode is typical for most Apex transactions, such as trigger execution, Visualforce controller methods, and custom Apex code invoked by users through the Salesforce UI or API. System Mode: When an Apex class executes in system mode, it runs with elevated permissions and bypasses the organization's sharing rules, FLS, and other user-specific permissions. In system mode, Apex code can perform operations that are not available to the executing user, such a...

Conditionally render fields on Visualforce page based on picklist values

 An example of how to render a Visualforce page based on criteria. <apex:pageBlock id="xxxpb1"> <apex:pageBlockSection>                      <apex:actionRegion >                  <apex:inputField id="xxxif1" value="{!Object.picklistfieldapiname1}" required="true" >      <apex:actionSupport event="onchange" rerender="xxxpb1" />   </apex:inputField> </apex:actionRegion>                   </apex:pageBlockSection>                 <apex:pageBlockSection id="xxxpbs1" rendered="true">  <apex:inputField id="xxxif2" value="{!Object.Fieldtobedisplayed1}" rendered="{!IF(Object.picklistfieldapiname1 ='picklist value 1' || lead.Buyer_Type__c ='picklist value 2' ,true,false)}"/> </apex:pageBlockSection> <apex:pageBlockSec...

Salesforce Security Best Practises

Recommended Security Best Practices Implementing security best practices in Salesforce is crucial to protect sensitive data, maintain compliance with regulations, and safeguard your organization's reputation. Salesforce Security Multi-factor authentication (MFA) MFA is a secure method of authentication where users must provide multiple pieces of evidence to log in. It can include a combination of username/password, security keys, or authentication apps. These apps generate unique codes for added security. Mobile devices can also use biometric authentication like fingerprint scans or facial recognition. Implement precise access control using profiles and permission sets Using profiles and permission sets in Salesforce is essential for implementing security controls to ensure that users have appropriate access to data and functionality within the system. Profiles: Control access to objects by assigning appropriate object-level permissions to profiles. You can specify whether users ca...

Audience Targeting in Experience Cloud (Aura Site)

Image
Audience targeting in Experience Cloud (formerly known as Community Cloud) allows you to personalize the content and user experience for different groups of users based on their characteristics, behaviors, or attributes. This functionality enables you to create tailored experiences for specific audiences, improving engagement, satisfaction, and conversion rates. Audiences are sets of criteria used to define community member segments. Use them to keep your community members engaged by offering them personalized, relevant content in a customized community. Say that a company offers a product that is different in different regions. Rather than creating different communities, the community manager could simply create different experiences in the same community. Using Experience Builder, the community manager can apply sets of criteria to pages, components, branding sets, CMS collections, navigation menus, or tile menus. What members see varies depending on their location. The criteria incl...

Obtain the name of the SObject from a given record ID

In Apex, you can obtain the name of the SObject from a given record ID using the getSObjectType () method provided by the Id class. Example Id recordId = '001XXXXXXXXXXXX'; // Replace this with the actual record ID // Get the SObject type from the record ID Schema.SObjectType sObjectType = recordId.getSObjectType(); // Get the name of the SObject String sObjectName = sObjectType.getDescribe().getName(); System.debug('SObject Name: ' + sObjectName); In this example: recordId.getSObjectType() returns the Schema.SObjectType of the object associated with the record ID. sObjectType.getDescribe().getName() retrieves the name of the SObject. This approach allows you to dynamically determine the SObject name from a record ID in your Apex code.

The Translation Workbench in Salesforce

Image
Use Translation Workbench to maintain translated values for metadata and data labels in your Salesforce org. Specify languages for translation and assign translators for each language. Manage translated values for any Salesforce supported language. Translators can maintain translations directly through the workbench, or you can export translation files for bulk translation imports. This feature is particularly useful for organizations operating in multilingual environments or serving diverse customer bases. The Translation Workbench is a valuable tool for creating a localized experience for users in different regions and language preferences within Salesforce. By translating objects, fields, and metadata, you can improve user adoption and provide a more inclusive experience for your users worldwide. Enable Translation Workbench Translation Considerations Steps to Enable Translation Workbench and Add Languages Salesforce Additional Features to Translate Field Labels, Values, and Many m...