In this post we are Integrating one Salesforce Org (Org A) to another Salesforce Org (Org B), in which we will fetch Account details from Target org by passing account number. Before writing code you need to do some settings as mentioned below:

Org A (Source Org)
  • You need to set the endpoint URL of Target Org in the Remote Site setting (setup >> Remote Site Setting).
  • Then you need to write a) API Class. b) Lightning Component to show details
Org B (Target Org)

  • Create a connected app (please refer image below) and obtain clientId, clientSecret, username, password (a combination of password and security token) from Org B (Target Org).
  • Write Webservice class that consumes Account Number and return the account details to Source Org.

Source Org (Org A)

Target Org (Org B)