Posts

Auth.AuthProviderPluginClass to configure an external Salesforce authentication provider

global class B2BTIDAuthPlugin extends Auth .AuthProviderPluginClass { private String customMetadataTypeApiName; private String redirectUrl; private String consumerKey; private String consumerSecret; private String authorizationUrl; private String accessTokenUrl; private String userInfoUrl; private String scope; /** * @description This method is responsible for returning the custom metadata that           stores the api credentials and other details * @author Raja Patnaik | 01-24-2022 * @return String Returns the custom metadata type API name for a custom           OAuth-based authentication provider for single sign-on to Salesforce **/ global String getCustomMetadataType () { String methodName = 'getCustomMetadataType' ; System . debug ( 'Entered Method: ' + methodName ); customMetadataTypeApiName = ...

Custom Authentication Provider Plug-in for SSO

Image
Custom Authentication Provider Plug-in for Single Sign On (SSO)   Create a Custom Authentication Provider Plug-in Authentication Providers You can use third-party authentication providers to configure single sign-on (SSO) and access protected third-party data in Salesforce. This SSO solution, known as social sign-on, includes predefined authentication providers for Facebook and Google. Additionally, you can set up an authentication provider for a third party using OpenID Connect or create a custom provider with OAuth 2.0 support. Customize your authentication provider with request parameters after setting it up. Before you create your Apex class, you create a custom metadata type record for your authentication provider. For details, see Create a Custom External Authentication Provider . Assuming you already have Client ID , Client Secret , Scope , Access Token , Authorization and User Infor URL. Step 1 - Created a Custom Meta-Data to hold Endpoints and Authentication Details Objec...

Data Skew in Salesforce

Image
Data skew in Salesforce refers to a condition where the distribution of related records is uneven or imbalanced across parent records. This can occur within standard or custom objects when many records are associated with a single account, user, or parent record.  Two primary types of skew can happen in Salesforce: Ownership Data Skew: This happens when a single user owns many records. For example, suppose one user owns tens of thousands of account or opportunity records. In that case, it can cause performance issues because the system optimizes sharing calculations based on a more balanced record ownership model. Parent-Child Data Skew: This is a situation where a large number of child records are linked to a single parent record. A typical example is having thousands of contact records associated with a single account. When a child record is created, updated, or deleted, Salesforce must lock the parent record to maintain data integrity. This can lead to contention and performa...