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
subbu123.pbt@gmail.comsubbu123.pbt@gmail.com 

Deploy Apex class and Trigger ?

What are the methods are involved while deploying the Apex class and trigger ?

 

Thank u in Advance.

OhadiosOhadios
I'm not sure I fully understand your question...
If you had written the classes/triggers - you need to also write Test methods.

Once your code is tested at least 75% - you can deploy to your production environment using the "Deploy" section in Setup in your sandbox.
Naveen NelavelliNaveen Nelavelli

using eclipse or change sets you can deploy...before that make sure that your over all organization code coverage is 75%..

pooja@magichorse.compooja@magichorse.com

For deployment from salesforce follow these steps.

 

1. Go to Setup -> App Setup -> Deploy.

2. Now first click on Deployment Connections to check target organisation has allowed inbound changeset from your current source or not.

i.e. suppose you are working on Dev Sandbox, and you are trying to deploy your sandbox changes to your related Production. Then in Deployment connection list you will see Production in list and in last column "Upload authorization direction" you can see current status which is as below

      a. Dev -- Production (red line without arrow) : indicates there is no deployment connection between dev and production

      b. Dev --> Production: indicates that you can upload change set from Dev to Production and depoy it from production.

      c.  Dev <--> Production: You can do step b. in both way.

3. Now if your production allows inbound changesets then you can proceed next step.

4. Now again back to App Setup -> Deploy.

5. Click on Outbound Changeset

6. Click on new

7. Give name and description

8. Now your change set is created. You can add your components here using Add button.

9. Once you add all components, click on Upload button and select target organisation (Production).

10. It may take time to upload changeset to production. You will be notified by email once change set is uploaded to production.

11. Now login in your target organisation (production) as a system administrator.

12. Go to Setup -> App Setup -> Deploy -> Inbound change set

13. You can see your recently uploaded change set from Dev sandbox.

14. Open that change set and click on "Validate" to validate your change set (it will only validate, not deploys).

15. If no error found in validation then you can click on Deploy button to deploy your change set. (If you click on deploy without clicking on validate button then also it will deploy your change set, Deploy = validate + deploy)

 

Hope this will help you.