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
Anthony.TAnthony.T 

Can't Deploy Apex code to Production Org

Hi everyone,

I created an Apex code in my sandbox (following this link (https://help.salesforce.com/articleView?id=hvs_cadences_auto_remove_targets_process_apex.htm&type=5) and this link (https://help.salesforce.com/articleView?id=changesets_outbound_components_select.htm&type=5)) but cannot get it to upload to my Production Org. Anyone know why it says I am not authorized to do so?

User-added image
Any help is much appreciated!!
Best Answer chosen by Anthony.T
Colton WehkingColton Wehking
Hi Anthony,

You must first authorize the sandbox (in production) by going to Setup -> Environments -> Deploy -> Deployment Settings -> Set up the deployment connection for your sandbox

All Answers

Colton WehkingColton Wehking
Hi Anthony,

You must first authorize the sandbox (in production) by going to Setup -> Environments -> Deploy -> Deployment Settings -> Set up the deployment connection for your sandbox
This was selected as the best answer
Kamesh SinghKamesh Singh

Hello Anthony,

Please make sure you authorize both the sandboxes, before pushing change set.
Please read Deployment Settings notes on your sandbox for better understanding.

Thanks,
Kamesh
Anthony.TAnthony.T
It worked! Thanks so much for the quick help Colton & Kamesh.