function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vlrvlr 

One php form two Salesforce orgs

I need to create a PHP form that will simultaneously send data to two Salesforce orgs, and update Accounts, Contacts, and some custom objects. Is it possible? What will be the approach to implement this? ( if it webservice, how can I use two stubs/wsdls from two different orgs for the same php form? )

 

Thanks.

CheyneCheyne

This is certainly possible. I would recommend looking into the Force.com Toolkit for PHP. Since you are inserting records into two different Salesforce orgs, you'll just need to create two separate connection objects to work with. In other words something like

 

$sfdc1 = new SforceEnterpriseClient();
$sfdc2 = new SforceEnterpriseClient();

$client1 = $sfdc1->createConnection('path_to_wsdl_1');
$client2 = $sfdc2->createConnection('path_to_wsdl_2');

$login1 = $sfdc1->login('username1', 'password1');
$login2 = $sfdc2->login('username2', 'password2');

...

 Then you shoul be able to insert records into the different orgs using the corresponding connection objects (in this case, $sfdc1 and $sfdc2).