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
Marcelo TudiscoMarcelo Tudisco 

outbound change set to production dependencies

Hi, i have just created a new developer sandbox, on that sandbox I create a before delete trigger on CampaignMember, i create a test class and do the tests to get code coverage. After that i create a new outbound change set with the trigger to upload it to production. If i just add the trigger to the change set (no dependencies), when i go to production and in the inboud change set try to validate it, it fails because i do not satisfy code coverage. If on the sandbox i add the trigger and add all dependencies then i can deploy it on production. In those dependencies it adds a custom field and a global value set.

Can anyone explain me why it adds that custom field and that global value set as dependant when they are already on production? Why does the validate on production fails if i dont add the dependencies to the change set, even though those depencies already exists on production?

thanks
 
Raj VakatiRaj Vakati
, it fails because i do not satisfy code coverage you can deploy the change  the test class with Run sepcified test class option and add you test class it ti 

Run Specified Tests
Only the tests that you specify are run. Provide the names of test classes in a comma-separated list.
Marcelo TudiscoMarcelo Tudisco
Thanks Raj, but my question is why do i have to add the dependencies if all the ones detected are things that are already on production?
Raj VakatiRaj Vakati
Salesforce wnt add any dependencies by default .. but you can check the dependence by clicking on the add dependence  button and add what you want to include it in change set 


View and Add Dependent Components to a Change Set
From Setup, enter Outbound Change Sets in the Quick Find box, then select Outbound Change Sets.
In the Change Sets list, click the name of a change set.
Click View/Add Dependencies.
On the Component Dependencies page, select the dependent components you wish to deploy and click Add to Change Set.

 
Marcelo TudiscoMarcelo Tudisco
Thanks Raj, i'm not asking salesforce to add dependencies, and i know how to add them. What i mean is WHY in the dependencies it add fields and values that already exists on production, its like if it would want to create them again.