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
jonpilarski1.3914448382645588E12jonpilarski1.3914448382645588E12 

Deploying custom object to production question

Hi All,

I have added several new custom fields and validations to one of our existing custom objects. Now it is time to deploy to production. In my change set can I simply deploy the object or do I need to create change set comprised of every change (field and validations added). And, if I do just deploy the object is production data preserved?

Thanks as always,,
Jon
James WooleyJames Wooley
Hi Jon,

If you have added/modified fields and validation rules, you must add these to the change set.

Deploying metadata changes (which is what deploying a change set is doing) won't affect the data in the destination environment, so yes your production data will be preserved.

Thanks,
Jamie.
Yossi 4Yossi 4

B"H
Taken from the docs:
"To deploy a custom object and all of its fields, you must add the custom object and every field to the change set; adding just the custom object to the change set won't cause deployment to fail, but results in an empty custom object."
https://help.salesforce.com/apex/HTViewHelpDoc?id=changesets_best_practices.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=changesets_best_practices.htm&language=en)