Magulan Duraipandian

Salesforce

How to get Access Token from Microsoft with grant_type as client_credentials using Apex in Salesforce?

Get the Tenant Id and client secret value(not the id). Sample Code: String strEndPoint = 'https://login.microsoftonline.com/{Enter_Tenant_Id}/oauth2/v2.0/token'; String strBody = 'grant_type=client_credentials&scope=https%3a%2f%2fgraph.microsoft.com%2f.default'; strBody += '&client_id={Enter_Client_Id}&client_secret={Enter_Client_Secret}'; HttpRequest req = new HttpRequest(); req.setEndpoint( strEndPoint ....

Salesforce

Calling Flow from Salesforce Lightning Web Component

Lightning Web Component: <template> <lightning-card title="Sample LWC Component"> <lightning-input type="text" onchange={handleInputChange}></lightning-input> <lightning-button label="Open Flow" onclick={openFlow}></lightning-button> </lightning-card> </template> JavaScript: import { LightningElement } from 'lwc'; import { NavigationMixin } from 'lightning/navigation'; ....