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
Peter KempPeter Kemp 

PHP: Extracting relationships and option data from the partner WSDL

Hi,

 

It seems that SF to mySQL replicators are the flavour of the month.  Having used Mike's code to build my own and back up our entire Salesforce instance, I was wondering if there was a way to extract the relationships between objects?  Getting secondary keys and enforcing the relationships when you build the mysql tables would allow for a proper copy of salesforce.  I was hoping there would be a neat way to do this with the partner wsdl.  Also it would be good to get the the optional values for fields such as salutation = Mr. Mrs. Ms. Miss. Dr. ... directly from the database so when you are editing your mysql you are under the same restrictions as you would be on salesforce.

 

I suppose what I'm asking for is access to the Salesforce database schema using php.

 

I can kind of  see how this could be achieved through the enterprise wsdl, but haven't played with that yet.

 

Any help would be great.

 

Thanks

 

Pete

 

Message Edited by Peter Kemp on 03-10-2009 03:38 AM
Peter KempPeter Kemp

Seems that I should have just searched a little harder.  The relationships appear to be stored in the result of calling:

 

DescribeSObjects()

 

through

 

ChildRelationship[]

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobjects_describesobjectresult.htm#i1427334

 

There also seems to be the ability to scrape the picklist values from here:

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobjects_describesobjectresult.htm#i1427375

 

I'll get to work enforcing these relationships