4

I am deploying 3 custom objects from one sandbox environment [Sandbox 1] to another [Sandbox 2]. After having validated & deployed the custom objects on [Sandbox 2], I noticed that the standard fields on the custom objects have come over, but the custom fields are missing.

So my question is do I need to add the custom fields separately to the changeset or am I doing something wrong?

  • 1
    You have to add the fields in the changeset as well, they don't just come over with the object. – Girbot Nov 12 '14 at 16:04
  • Thanks! That explains a few things. I was trying to find this in the salesforce docs, but it is not present in there. – abhi Nov 12 '14 at 16:23
5

Yes, when you deploy via change sets, you have to include all the individual pieces of an object explicitly. Fields and layouts are the ones that catch me most often. It can be a major nuisance to wade through the fields to find the right ones if you have many objects and fields in your data model. Sorting by Type (object name) can help, but there may still be a lot of clicking on "next".

In the comments, SFDCfox points out the Change Set Components section of the Change Set page has a "View/Add Dependencies" button. This will show you a list of items (fields, buttons, list views etc.) that are connected with the object or objects already in your change set. This list will be shorter than the list of all fields. However, bear in mind that:

If your change set contains more than 2500 dependencies you will only be able to see the first 2500 in the view dependencies page.

If you deploy objects with Eclipse, you won't have this problem with needing to list individual fields etc. Of course, getting up to speed on Eclipse is not a small task.

  • 3
    That said, all you really need to remember is to use the "Add Dependencies" button to catch most of the items you'll need for a successful change set deployment. – sfdcfox Nov 12 '14 at 16:36
  • Interesting! That feature had somehow eluded my notice till now. OTOH, for the object I just tested it with, I still get a list of over 1000 dependency items - and the list isn't sortable. I'll edit my answer to include this feature in an hour or two. – Jagular Nov 12 '14 at 17:00
  • It's definitely a very "complete" search, probably a bit overkill in some cases, but when you need it, it's there. – sfdcfox Nov 12 '14 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.