You need to sign in to do that
Don't have an account?

Confused on Code Coverage for one trigger AttachmentTrigger, why am I getting 0% coverage?
Hello, I have a trigger that I think someone deployed with a Salesforce Labs app, it is very basic (I do not know apex very well). When I run all the tests through the developer console it shows we are at 80% coverage and this specific trigger gets 100% coverage. However, when I use a change set to deploy any Apex code I get the following error.
AttachmentTrigger, Details: Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required
1
2
3 trigger AttachmentTrigger on Attachment (after insert) {
TriggerUtility.updateCaseLastActivity(Trigger.New,'attachment');
}
I am not sure where to start if I need to write a test class for this, any suggestions and any idea why there is a difference?
Thanks in advance
Michael
AttachmentTrigger, Details: Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required
1
2
3 trigger AttachmentTrigger on Attachment (after insert) {
TriggerUtility.updateCaseLastActivity(Trigger.New,'attachment');
}
I am not sure where to start if I need to write a test class for this, any suggestions and any idea why there is a difference?
Thanks in advance
Michael
Error: expecting a right parentheses, found 'ID' at line 8 column 45, which is right after sObject and before ID.
This is the full code.
Thanks!