Posts

Freeze or Unfreeze multiple Users at once

You can freeze a User account instead of deactivating them. This is intended to be used in situations where the User account requires more work before deactivating it. It is also possible to freeze multiple Users at once, by using the latest version of Data Loader . The User property 'Frozen' is controlled in the object 'UserLogin' by the field 'IsFrozen.'  IsFrozen is a boolean field so it is either 'true' (frozen) or 'false.'  System Administrators can use Data Loader to export and update the  UserLogin   object. 1. Run an Export using Data Loader from the  UserLogin  object ( Note:  Select the  Show all Salesforce objects  checkbox). 2. Select the  Id ,  UserId ,  IsFrozen  fields and complete the export. Query example:  Select UserId, Id, IsFrozen FROM UserLogin Note:  It's not possible to export additional user details such as Full Name, Username, or Email on export of UserLogin records. It's recommende...

Salesforce Architecture Diagrams

Here are some resources to get you started using Salesforce architecture diagrams. Salesforce Architects | How to Build Salesforce Diagrams Salesforce Architects | Documentation and Implementation Diagrams The concept of using levels to convey different kinds of detail is common to many frameworks, including the C4 model which is used to visualize software architectures. The C4 model for visualising software architecture Getting Started with Salesforce Diagrams Diagramming Essentials How to Build Documentation and Implementation Diagrams | Trailhead Live Project Documentation for Salesforce B2C Commerce Functional Architects Salesforce Architecture Diagrams: Quick Look

Authenticate using the SOAP login request

Login using the SOAP login request and from then on use the session token for making REST API requests.In this we need to pass Username and Password as credentials.Upon invocation, the API authenticates the credentials . It then returns the  sessionId , the user ID associated with the logged-in username, and a URL that points to the Lightning Platform API to use in all subsequent API calls.If Salesforce returns a Login fault , try adding the security token at the end of the user’s password.  The limit is 3,600 calls to login() per user per hour. Exceeding this limit results in a “Login Rate Exceeded” error. After reaching the hourly limit, Salesforce blocks the user from logging in. Users can try to log in again an hour after the block occurred. Sample Code -             HTTPRequest request = new HTTPRequest();             String username = 'rpatnaik@docmation.com';            ...

OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration

Image
In a server-to-server integration, there is no need for an user to interactively log in to provide authorization.  In this case OAuth 2.0 JSON Web Token (JWT) bearer flow can provide the authorization. Communities support all available authentication flows, except for the username-password OAuth authentication flow and the SAML assertion flow ( https://help.salesforce.com/articleView?id=networks_auth_configure_oauth.htm&type=0 ) Hence , we can use a flow like web server or user agent flow or use JWT flow. ( https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=0 ) When we talk about JSON Web Token, it is consist of 3 parts Headers –  Which contains the algorithm which will be used to sign the request Payload –  The actual data and information about the users Signature –  Signature consists of 3 parts and the structure is given below.   Payload consist of 4 parts issuer "iss", this is the consumer key for your connected app audi...

Authenticating Using Salesforce Community User

Scenario - Sometimes we want to authorize servers to access data without interactively logging in each time the servers exchange information. For these cases, we can use the OAuth 2.0 JSON Web Token (JWT) bearer flow. This flow uses a certificate to sign the JWT request and doesn’t require explicit user interaction. However, this flow does require prior approval of the client app. Profiles will need to be pre-authorized with the connected app. There was also a requirement to make a rest call to get Salesforce data using Salesforce Community User Context. Option 1: Authenticate using the SOAP login request Option 2: OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration