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 »

Create and update custom labels using Tooling API

GOAL To be able to create custom label along with translation programmatically. SOLUTION We can use tooling API to create the custom label and its translation as below. The Master label is stored in External String and translation is stored in ExternalStringLocalization Request to create master label: Endpoint Payload Response We can grab the Id of Master Label …

Create and update custom labels using Tooling API Read More »

Custom Live Chat Using Salesforce Live Chat REST API

PREFACE We may choose to build a custom live chat app using Salesforce Live Chat REST API. There may be below given reasons or any specific reasons: Custom Experience:- Header, Footer, Navigation, Offline Form, Pre-chat Form Security Reason:- Salesforce generated embedded service snippet code does not require authentication and works publicly. Also, the script may …

Custom Live Chat Using Salesforce Live Chat REST API Read More »