Share Your Experience With Others

Salesforce to Salesforce Integration

To Get Data

  • Enable my domain in both orgs
  • Create a connected app on server org
  • Make sure your server endpoint is saved in remote site settings
  • Hit the url string accesstokenEndpoint = ‘https://login.salesforce.com/services/oauth2/token‘; and get access token and instance url
  • Hit the server rest api to get data
    • string leadGetEndpoint = instanceurl+’/services/apexrest/LeadService/name=’+leadSearchName;
  • Parse the response using JSON.deserialize and show to the prefer page or component

To Create Data At Server

  • Same as get but we need to pass data in JSON format to server using JSONGenerator Class
  • Sometimes to make integration we don’t need any kind of authorization. It depends on the kind of API we are calling. We can directly hit URL and get the response

One response to “Salesforce to Salesforce Integration”

  1. krishnasharama Avatar
    krishnasharama

Leave a reply to krishnasharama Cancel reply