Using Userinfo.getSessionId in LWC Throws Invalid Session Id

PROBLEM After Summer ’17, Salesforce disabled it while using in Lightning Domain to enforce the security measures. Here is Salesforce known issue: https://issues.salesforce.com/issue/a028c00000qQ1F3AAK/summer17–generating-a-session-id-from-lightning-domain-provides-invalid-session-id Solution – Named Credential Use Named Credential to get the session id. Steps: Once you’ve logged in there, the refresh token is saved and used by the named credential. From there, you …

Using Userinfo.getSessionId in LWC Throws Invalid Session Id Read More »

Maximum SOQL offset allowed is 2000 for Pagination

Salesforce Help Article There is a help article suggested by Salesforce: https://help.salesforce.com/articleView?id=000339353&type=1&mode=1. However, there are some good ways to use this. PK Chunking – the one we used to use Bulk API For example, let’s say you enable PK chunking for the following query on an Account table with 10,000,000 records. SELECT Name FROM Account …

Maximum SOQL offset allowed is 2000 for Pagination Read More »

Box Authentication – Getting Access token Using JWT OAuth2.0 in Salesforce

This articles explains how can we authenticate in Box.com using JWT OAuth 2.0. Here is the API details in Box API documentation: https://developer.box.com/guides/authentication/jwt/without-sdk/ Box – Prerequisites Salesforce – Prerequisites Apex Code A). In following implementation, we are not using standard JWT and JWS because it throws error “Signature verification error. The public key identified by …

Box Authentication – Getting Access token Using JWT OAuth2.0 in Salesforce Read More »