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
Andy TheimerAndy Theimer 

Can't deploy my first Trigger because default code completion is < 75%

We just upgraded to SF Enterprise mainly to access Triggers.  I wrote my first trigger + test class.  It's code coverage is 100%.  However, when I try to deploy it it fails with a message saying total code coverage is %63.  When I go to Develop -> Apex Classses -> Run All Test I can see which classes have problems HOWEVER Docusign and Marketo are the only packages with red x'd items.  Obviously, there's no way for me to remove these as they're mainstays in our company.  So now what?

Also, just to be sure, I need to deploy both my new trigger and its test class correct?  I

I have no clue on what to do next, am I missing something?

Thanks for any help!
Vinit_KumarVinit_Kumar
Andy,

Whenever you deploy from Sandbox to production.The production code coverage is calculated  and it does not include managed package code coverage.

I would suggest you to the Run All Tests in production and see which classes don't have code coverage,once you have found that you need to fix those before deploying new ones.

If you still need any help,ping me back ,I can help you out..
Andy TheimerAndy Theimer
Thanks for your response Vinit,

Just to be clear, I have never developed or added anything to SF prior other than installing a package or two from the AppExchange.  I have tried to remove anything not mission critical to aleviate this error but to no avail.

So, Build->Develop->Apex Classes ->Run All Tests correct?

It runs 152 Classes.  The Status column shows green checks for all lines except the following which have red checks... again all Docusign or Marketo.

dsfs.DocuSignChatterAttachmentTriggerTest
dsfs.DocuSignCreateAndSendEnvelope
dsfs.DocuSignEnvelopeController_Tests
dsfs.DocuSignEnvelopeDocumentController
dsfs.DocuSignEnvelopeRecipientController
dsfs.DocuSignEnvelopeRecipientUtils
dsfs.DocuSignUtils
dsfs.m_EditDocuSignEnvelopeControllerTest
dsfs.m_SubmitDocuSignEnvelopeControllerTest
mkto_si.TestRemoveInterestingMomentLinebreaks


Is there somewhere else I should be looking for things?
Vinit_KumarVinit_Kumar
Andy,

These are managed package classes so this would not have any impact while deploying new Trigger.We are only concerned about what all are the custom classes which don't have code coverage,I mean the classes which have been developed as part of any custom development.

Hope this helps !!
Andy TheimerAndy Theimer
Reading more, going to Developer Console in Production shows the following:

User-added image

Likely the driver of the low code-coverage is shown here... BUT these are all stock SF Classes related to the new Communities feature we purchased( which is pretty crappy in my opinion btw)
Andy TheimerAndy Theimer
And now I found the following:

https://developer.salesforce.com/forums?id=906F000000093E5IAI

Shows SF Communities is the problem.
Vinit_KumarVinit_Kumar
It seems that the communites classes are the root cause of your issue and you need to fix them as per suggestion in the earlier post.

Then,you are good to go :)