Salesforce: script to create custom object and fields

salesforce

Solution

You're looking for the Metadata API, or already developed tools which use the metadata api.

http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_intro.htm http://www.salesforce.com/us/developer/docs/api_meta/index.htm

Though using it directly will still require some developement, which may not save you much time. you get metadata in XML, but would still need to process it to what you want to achieve.

Somewhat also depend on the nature of what you want to do. I for instance had a requirement today for 150 custom labels based on an input file. Was much faster to generate metadata XML than to ever do that in the web interface. Deployed the metadata using the force.com IDE.

Problem

Is there a way to create custom objects and fields by using script or IDE ? Salesforce is very easy to use, however, it's so time-consuming to create so many fields on Web interface. So, just wonder if there's ways to use script or IDE to create objects and fields in Salesforce?

Original source