Use this method when your embedded app needs to interact with the Salesforce REST API, such as executing a SOQL query.
componentDidMount() { let sid = LCC.getRESTAPISessionKey(); let conn = new JSForce.Connection({accessToken: sid}); conn.query("SELECT Id, Name from Account LIMIT 50", this.handleAccountQueryResponse); }
You can view and download this example in the Developerforce Github Repository.
Name | Type | Description |
---|---|---|
key | string | The REST API session key. |