Skip to main content
added 407 characters in body
Source Link
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

Adding dependency makes sure that you are not missing any components that's needed for deployment.

Example let's say you missed adding a field to the change set that does not exist yet in the target environment, the deployment will fail.

So if you know that the target orgs have all the fields and objects that your apex class is referencing you may skip adding dependencies.

It all depends on how much in sync your source and target environments are and what components you are moving. Sometimes adding all dependency is needed for smoother deployments.

Some considerations when moving all dependent metadata is to make sure you are not adding components that will override something that's unique to PROD.

One common example is metadata like named credential where your sandbox may be connected to a different endpoint than production and hence you may want to remove this component from changeset before moving to Production.

For the next question

If you have two classes depending on an object then that object is listedadded only once thereto changeset when you say "Add all dependencies". Nothing is duplicated in Changeset.

Adding dependency makes sure that you are not missing any components that's needed for deployment.

Example let's say you missed adding a field to the change set that does not exist yet in the target environment, the deployment will fail.

So if you know that the target orgs have all the fields and objects that your apex class is referencing you may skip adding dependencies.

It all depends on how much in sync your source and target environments are and what components you are moving. Sometimes adding all dependency is needed.

For the next question

If you have two classes depending on an object then that object is listed only once there. Nothing is duplicated.

Adding dependency makes sure that you are not missing any components that's needed for deployment.

Example let's say you missed adding a field to the change set that does not exist yet in the target environment, the deployment will fail.

So if you know that the target orgs have all the fields and objects that your apex class is referencing you may skip adding dependencies.

It all depends on how much in sync your source and target environments are and what components you are moving. Sometimes adding all dependency is needed for smoother deployments.

Some considerations when moving all dependent metadata is to make sure you are not adding components that will override something that's unique to PROD.

One common example is metadata like named credential where your sandbox may be connected to a different endpoint than production and hence you may want to remove this component from changeset before moving to Production.

For the next question

If you have two classes depending on an object then that object is added only once to changeset when you say "Add all dependencies". Nothing is duplicated in Changeset.

Source Link
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

Adding dependency makes sure that you are not missing any components that's needed for deployment.

Example let's say you missed adding a field to the change set that does not exist yet in the target environment, the deployment will fail.

So if you know that the target orgs have all the fields and objects that your apex class is referencing you may skip adding dependencies.

It all depends on how much in sync your source and target environments are and what components you are moving. Sometimes adding all dependency is needed.

For the next question

If you have two classes depending on an object then that object is listed only once there. Nothing is duplicated.