You need to sign in to do that
Don't have an account?
Dee Dee Aaron
Code Coverage Failure - Your code coverage is 0%.
Hi. I found this apex class online. It triggered successfully in my sandbox. When deploying to my production org, I tried validating and received an error:
Code Coverage Failure: Your code coverage is 0%.
This is the Apex Class:
public class DeleteUnacceptedQuotes
{
@InvocableMethod
public static void QuoteDelete(List<Id> OpportunityIds)
{
List<Quote> Quotes =[select id from quote
where Opportunity.id in :OpportunityIds
and Status != 'Accepted'];
delete Quotes;
}
}
Thank you for your help!
Code Coverage Failure: Your code coverage is 0%.
This is the Apex Class:
public class DeleteUnacceptedQuotes
{
@InvocableMethod
public static void QuoteDelete(List<Id> OpportunityIds)
{
List<Quote> Quotes =[select id from quote
where Opportunity.id in :OpportunityIds
and Status != 'Accepted'];
delete Quotes;
}
}
Thank you for your help!
I was able to use the below code and I was able to achieve complete code coverage can your try checking this:
For further understanding of trailhead module you can try checking the trailhead module https://trailhead.salesforce.com/en/content/learn/modules/apex_testing
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
All Answers
I was able to use the below code and I was able to achieve complete code coverage can your try checking this:
For further understanding of trailhead module you can try checking the trailhead module https://trailhead.salesforce.com/en/content/learn/modules/apex_testing
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.