Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Salesforce: script to create custom object and fields

Tags:

salesforce

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?

like image 641
Cray Kao Avatar asked Nov 21 '12 10:11

Cray Kao


People also ask

Can we create objects and custom fields using schema builder?

Create Fields with Schema BuilderCreating fields with Schema Builder is just like creating objects. From the Elements tab, choose a field type and drag it onto the object you just created. Notice that you can create relationship fields, formula fields, and normal fields in Schema Builder.


1 Answers

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.

like image 59
Samuel DR Avatar answered Sep 24 '22 15:09

Samuel DR