AnswerBun.com

Fatal Error Deploying Apex from Sandbox to Prod

Salesforce Asked on January 2, 2022

I made some small tweaks to an apex class in sandbox and all my unit tests passed in sandbox, I tried pushing the apex classes and the unit tests.

The error I’m getting is Fatal Error and that my code has no coverage. In sandbox, my code is north of 90%. The developer console doesn’t give me any logs of the apex deployment so I can’t debug there.

What am I missing?

enter image description here

enter image description here

UPDATE: The unit tests that cover this code are already live in production. When I validation the change set I run all of them

  • SalesForecastCreateBatch_Test
  • SalesForecastUpdateBatch_Test
  • SalesForecastCreate_Controller_Test
  • SalesForecastSchedulerTest

As you can see below the code coverage for both classes in sandbox are >= 90%.

enter image description here

enter image description here

One Answer

Following may be the reasons:

  1. You have two classes mentioned in the error does not have 75% code coverage in the org(production)
  2. You have not included the test classes in the deployment that you are currently doing and hence the system is looking for the 75% code coverage for these classes in org which it calculates to be <75%

Answered by freaker87 on January 2, 2022

Add your own answers!

Related Questions

How to truncate a string to a specific length if it is longer?

4  Asked on February 10, 2021 by imajmdf

   

Update contact activity in Journey builder

1  Asked on February 10, 2021 by mary-jon

 

Hide iframe url

1  Asked on February 8, 2021 by cloudy-ritz

       

How can we add placeholder for lightning:InputField?

1  Asked on February 6, 2021 by aakash-poudel

 

LWC OSS Build Command

1  Asked on February 3, 2021 by scott-morrison

 

%%_PreHeader%% Personalization String

1  Asked on February 2, 2021 by victorcorey

   

Marketing cloud new Transactional Messaging API

1  Asked on January 30, 2021 by martijn-e

     

Can’t send to a list in marketing cloud?

1  Asked on January 30, 2021 by 4kaudio

     

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP