AddThis Feed Button

Recent Items

Today I had to add 32 Checkbox fields to my Contact object. I could have done this by manually creating each field, but the thought of clicking through over 100 screens didn’t take my fancy. So, I thought I’d take the Metadata API for a spin.

The last time I played with Metadata, I did it via the command-line Metadata Migration Tool . This time I decided to do it via the IDE.

Fortunately, there’s plenty of information available on this topic, the best of which are:

First I updated my IDE extensions in Eclipse (always make sure you’re working on the most recent version!). One nice feature I see they’ve added is the ability to select exactly which objects are copied down to the IDE. I simply ticked ‘Contacts’ and it appeared in my Package Explorer.

Then, I just did a Copy & Paste job on the metadata, changing the labels for each field.

<CustomObject xmlns="">
        <label>Entity Owns Active Bamboo</label>
        <label>Entity Owns Active Clover</label>

I then hit Save and the fields magically appeared in — I was even somewhat naughty and did it straight into my Production instance (although best practice would be to do it in the Sandbox and then copy across / deploy the change).

Okay, I’ve still got a bit of work to do if I want to add the Checkboxes to my Page Layout, but at least the laborious part is over — the rest is all Drag & Drop!

The Bottom Line

  • The latest IDE facility lets you choose Standard Objects without having to play with package.xml
  • Creating lots of fields can be done quickly via the IDE, rather than the normal UI

Comments are closed.