salesforce-lightning
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Setup

Join Object

It’s possible to retrieve child entities from an object.

For example if Object is Account, the join object could be Contact to get the Contacts of an Account.

All contact fields in the result are then prefixed with Contact_.

Query Object

Either use Join Object or Query Object, if Join Object is set this query is ignored.

This can be set to use a special query for fetching data, if the default API is not sufficient.

This needs to be a full and valid SOQL Query

Oauth Setup in Salesforce

  1. Create a connected Oauth App (New connected app)
    https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm

    Go to: [Instance-URL]/lightning/setup/SetupOneHome/home
    Then: Setup → PLATTFORM-TOOLS → Apps → App Manager → New connected App

    • Check API Enable OAuth Settings → Enable OAuth Settings
    • Set Callback-URL to (https://hubengine.marini.systems/oauth/authorize)
    • Select the following Oauth Scopes:
      • Manage user data via APIs (api)
      • Perform requests at any time (refresh_token, offline_access)
    • The following checkboxes have to be enabled:
      • Require Secret for Web Server Flow
      • Require Secret for Refresh Token Flow
      • Enable Client Credentials Flow
      • Enable Authorization Code and Credentials Flow
  2. Modify Permitted Users and IP Relaxation Setup → PLATTFORM-TOOLS → Apps → Connected Apps → Manage Connected Apps → “Manage” Button → “Edit Policies”:

    • OAuth-Policies → Permitted User select All users may self-authorize
    • OAuth-Policies → IP-Relaxation → select Relax IP restriction
  3. Note Consumer Key and Consumer Secret for Adapter Setup Setup → PLATTFORM-TOOLS → Apps → Connected Apps → Manage Connected Apps → Manage Consumer Details

    • Consumer Key - show and keep for adapter options
    • Consumer Secret - show an keep for adapter options

The following steps are optional if you want to test the connected Oauth App yourself with Postman:

  1. Generate Authorization Code

    Go to: [Instance-URL]/services/oauth2/authorize?client_id=[Verbraucherschlüssel]&redirect_uri=[Callback-URL]&grant_type=authorization_code&response_type=code

    • Approve the app and copy the code from the url
  2. Generate the access token

    Send a POST request to https://login.salesforce.com/services/oauth2/token

    • Body : x-www-form-urlencoded
    • Parameter :
      • code = generated authorization code
      • grant_type = authorization_code
      • client_id = [Verbraucherschlüssel]
      • client_secret = [Verbrauchergeheimnis]
      • redirect_uri = [Callback-URL]

    Get the access_token (and refresh_token) from the response

  3. Make API requests with authorization type : Bearer token

  4. If the access token has expired -> generate a new one with the refresh token

    Send a POST request to https://login.salesforce.com/services/oauth2/token

    • Body : x-www-form-urlencoded
    • Parameter :
      • grant_type = refresh_token
      • refresh_token = [refresh_token]
      • client_id = [Verbraucherschlüssel]