+ Start a Discussion

Creating fields in a bulk manner

Hi all


In Opportunity object  there a close to 500 custom fields. i want to move half of those fields in to a newly created custom object. I think it canbe done by metadata API.


Can anyone tell me what steps I have to follow to achieve this.


Hi Vikram,

you need to use the Force.com IDE to do that and the metadata API.

In short, you need to copy the XML markup for the fields metadata in the opportunity object and then paste it into the target object.

If you are familiar with XML, it should be fairly straightforward.

Please find an article with different pointers to other resources here:


This is in the case you need to do this as a one-off.

If you need to automate this, you need write a custom application (Java, C# or whatever supports webservices) to move fields from one object to another.

You can find examples on how to write a webservice client in the metadata api guide :

http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/meta_quickstart.htm?SearchType=Stem .



Hi Vikram,


To do that you will have to use Force.com IDE



The installation guide is here:



Believe me, its very easy to use Force.com IDE.