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
vikramkkvikramkk 

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.

sebcossebcos

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:

http://blog.sforce.com/sforce/2008/09/set-up-orgs-4-t.html

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 .

 

goabhigogoabhigo

Hi Vikram,

 

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

http://wiki.developerforce.com/index.php/An_Introduction_to_Force_IDE

 

The installation guide is here:

http://wiki.developerforce.com/index.php/Force.com_IDE_Installation

 

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