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
lsatonylsatony 

Copy custom fields across objects?

Hi,

 

Does anyone know if there's a way to share or copy custom fields created in a custom object with another custom object?

 

I've created a custom object containing a ton of custom fields, and need to move one of the sections to another custom object, but don't want to have to recreate all of the fields again from scratch.  Hope that makes sense.

 

Thanks!!

MarkSilberMarkSilber
You should be able to use Eclipse to move the configuration from one object to another. Just open the objects and view them as XML -- copy and paste from one to the other.
lsatonylsatony
Thanks!  Hmm - never used Eclipse.  Is there a way to do this within salesforce?
MarkSilberMarkSilber

Unfortunately no. However, Eclipse is pretty easy to use when you get it installed and configured. Just follow the instructions (carefully) here: Force.com IDE Instructions.

I think you'll find it's a powerful (and free) tool that will enable you perform these types of mass configuration changes without having to use the native Salesforce UI.

lsatonylsatony
Awesome - I'll check it out.  Thanks for your help!
MarkSilberMarkSilber
The tool was a little intimidating the first time I used it, but now i find it hard to live without -- especially when you start developing Apex Code and Visualforce pages. If you get a chance, can you please update your "Solution Accepted" to the reply that had the link to Eclipse so others can quickly see the solution?

Thanks.
lsatonylsatony

Yeah, I downloaded and installed it, but am pretty clueless on how to use it.  is there some instruction online for how to accomplish my goal with eclipse?

 

I can't seem to change my solution accepted....

lsatonylsatony
no luck with eclipse.  very confusing:(
lsatonylsatony

Ok, i think i worked out how to copy and save the fields.  One problem - I'm seeing an "only saved locally" warning on the object with the pasted fields in eclipse.  When i do "Save to server", i see progress bars and don't get any errors, but the fields do not show in the object in salesforce.

 

Any clues?  Could there be a conflict because of the custom fields being duplicated with the same IDs?

 

Thanks!!

JonPJonP

Can you walk through exactly what you did?  What are the objects you're copying fields from/to?  How did you get the .object files?  Are there any other errors besides "only saved locally"?

 

Thanks,

Jon

salesforce.com Product Manager