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
mandarmandar 

How to import all fields from SalesForce into Sforce

I'm a newbie to SalesForce (in fact this is my first post). So please forgive me if I'm asking something that has been asked several times before.

I'm trying to experiment with the API (connecting to sforce) and would like to have SForce fields set up so that it looks exactly like the SalesForce our sales people are using. Unfortunately, several fields get added or removed every day from different objects (accounts, contacts, etc). It is impossible for me to keep track of all the changes to keep these two in sync.

My question is: I know that you can export the WSDL which contains all the field information (along with several other pieces of information). Is there someway I can export this from SalesForce and import this into Sforce? Or is there another automated way of doing this?

Or do I just need to connect to the SalesForce service, query for all the tables and fields, turn around, connect to the SForce service, and then insert or delete those fields from the Sforce side? If so, I know how to get access to the fields (DescribeSObjectResult). Is there some API call to insert these fields into SalesForce? An example would be very much appreciated.

DevAngelDevAngel

Hi mandar,

I think you need to use the Partner wsdl for whatever it is you are trying to do.  The partner wsdl in combination with the describeSObject call will work no matter how often your schema changes.

mandarmandar

Thanks for your reply. My objective is to migrate all of our data from our old sales database into SalesForce. I can't use the live SalesForce one for obvious reasons. Hence I needed the Sforce one to be exactly the same. Once I have my code migrating the data properly, I can connect to the SalesForce one that our sales people are using and bring the data in.

I looked at the Partner wsdl and it looks more involved than the enterprise one. As an alternative, is there some API call to insert fields into the SalesForce database?

mandarmandar
To answer my own question: "Client applications cannot define custom fields via the sforce API".
benjasikbenjasik
We're piloting something you might find interesting. I'll contact you off the boards.