-1

Is it possible to login from One developer organization to other developer organization in salesforce using apex code.

5
  • You might want to think in terms of Salesforce to Salesforce Integration, in which case it certainly should be. Hope that's helpful. – crmprogdev Jul 16 '15 at 13:09
  • i think that one is done by customization i want to integrate using apex code.My scenario is to design vf page in that by giving user name and password of other organization after click login it should redirect to that organization .is it can be done – mahesh Jul 16 '15 at 13:11
  • My point was that Salesforce to Salesforce will use Apex on the back-end to do the customization along with SOAP or REST to connect the two. Are you asking if you can be logged-in to both at the same time or do you simply want to create a controller that passes the username and pw to the log-in controller for the SF log-in controller for the other org? Off-hand, I don't see why you couldn't do that, but best practice would be to use SSO or other authentication. – crmprogdev Jul 16 '15 at 13:22
  • Am confident other Devs with more experience would have other ideas on the subject. – crmprogdev Jul 16 '15 at 13:23
  • 1
    Yeah...I think the answer will lie in why you are trying to do this. Do you want to deploy something? Access data? Trigger some process? Embed the UI of one in the other? Do you want this only ever between two dev orgs? Do you ever want this between two prod orgs? This question, without more specific detail, is unanswerable. Please edit your question above and provide these details. Thanks. – pchittum Jul 16 '15 at 13:34
1

You can use the simple OATH2 Password Flow approach (https://login.salesforce.com/services/oauth2/authorize), simulate a SOAP request (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart_login.htm) or simply import the Partner API WSDL and let SOAP do the magic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.