Grids across orgs
Show and edit records from another Salesforce org through a Named Credential, with each person logged in as themselves.
- Who can
- System Administrator in both orgs
- Where
- Setup → Named Credentials, then Lightning App Builder
- Edition
- Foundation (free)
- Last updated
An admin connects the other org once. People then add a GridWorks Remote Grid to a page and work on that org's records as if they were local.
Before you start
- System Administrator access in both orgs to set up each side
- Both orgs' My Domain URLs for the callback and endpoints
- API Enabled in the remote org for everyone who uses the grid
#Step 1: in the remote org
Create an External Client App (or Connected App) with OAuth, the callback URL below, and the scopes *api* and *refresh_token, offline_access*.
https://<home org my-domain>.my.salesforce.com/services/authcallback/GW_SalesOrg#Step 2: in the home org
- Create an Auth. Provider of type Salesforce with URL suffix
GW_SalesOrgand the remote org's authorize and token URLs. - Create an External Credential
GW_SalesOrgwith OAuth 2.0 Browser Flow and a Per User Principal. - Create a Named Credential
GW_SalesOrgpointing at the remote My Domain, with no path. - Create a permission set with access to that principal and to User External Credentials, and assign it.
#Step 3: add a Remote Org record and the grid
In Custom Metadata Types → Remote Org, add a record with a label, a key such as SalesOrg and the Named Credential's name. Then drag GridWorks Remote Grid onto a page and set the remote org, object and columns.
#Step 4: each person logs in once
Each person opens Settings → External Credentials, chooses Allow Access on the connection and logs in to the remote org as themselves.
#If it does not work
- "Log in to Sales Org again"
- The person has not allowed access yet, or the login expired. Do step 4 again.
- redirect_uri_mismatch
- Copy the Auth. Provider's Callback URL into the remote app exactly, then wait a few minutes.
- "That org is not connected to GridWorks"
- Check the Remote Org record is active and the page's Remote org value matches its key.
- "Someone changed this row… after you loaded it"
- Choose Refresh, check their change, then edit again.
