• Kramer Hope 1
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
I have created an APEX trigger in sandbox and when I try to validate in production I am getting this error. 

Code Coverage Failure
The following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
 - UpdateLeadswithTask

This does not make sense to me as the tigger in production says I cover 76% of code. See attachtment User-added image

I did not write an APEX class specifically for the trigger, rather just ran tests on all of my existing. Tihs is what got me the 76%. Any ideas?
I have created an APEX trigger in sandbox and when I try to validate in production I am getting this error. 

Code Coverage Failure
The following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
 - UpdateLeadswithTask

This does not make sense to me as the tigger in production says I cover 76% of code. See attachtment User-added image

I did not write an APEX class specifically for the trigger, rather just ran tests on all of my existing. Tihs is what got me the 76%. Any ideas?
Hey everyone,

Here is the issue we need to resolve:

1) A lead is converted to an opportunity without being in a campaign yet
2) The lead is now the Primary Contact on the opportunity
3) After a while that Primary Contact gets put in a campaign

The issue?

4) The 'Primary Campaign Source' field on the opportunity needs to be populated with the last campaign the Primary Contact was added to

Can I do this with a regular Apex trigger? Or do I need to use batch Apex?

Thanks!
-Greg