New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Deploying Apex Trigger for Campaign Member #356
Comments
@StephanieKing I just ran into this exact same problem. You'll need to deploy a custom test method to make this work. In the Advanced section of edit page, you'll find the Test Code field. Put this into that box and try to redeploy.
|
Yep thanks @aheber thats trick! 👍 |
Thank you! |
Great tip, thanks @aheber! I'm running into the same issue. But I do not see a "Test Code" text box in the Advanced section. Just a checkbox that says "Test Code See All Data". Do I need to update to a new version? |
Check your on the latest version yes, if you are and your using the Custom Object based rollups (e.g. not the Manage Rollup Summaries which uses Custom Metadata) then ensure its on the layout (as these don't upgrade). |
Thank you @afawcett. Sorry for the newb question but how do I go about updating the app? |
No worries, just repeat the process you followed to install the package (see links in the README) you did before and the system automatically detects its an upgrade. Depending on the version your going from you may need to add some fields to layouts (these are not upgraded, see readme versions section and notes for each), though if your using the Manage Rollups page this does not apply. |
got it. works perfectly now. Thanks Andy, you rock! |
Thank you @aheber for the test code! |
I have the same problem but we use Person Accounts. I get the following error:
How would this code need to change? |
Thank you! |
@afawcett well here I am again... this is my post from 2016, and apparently I was able to fix this issue with the code above, but this time I don't understand at all where I am supposed to paste the code? What is the Advanced section of the Edit page?? Hoo boy.... |
@StephanieKing if you are on the Manage Lookup Rollup Summaries tab, there is an Advanced section at the bottom with a Test Code box. Paste the code there and click Save. |
@rogeramitchell oh gee, there it is. Much appreciated, sir!! |
Any ideas what to do with this Failed Trigger Deployment? I've tried it a few times with no luck...
dlrs_CampaignMemberTest.testTrigger System.DmlException: Insert failed. First exception on row 0; first error: MALFORMED_ID, Invalid campaign id: null: [CampaignId] Class.dlrs.RollupService.testHandler: line 277, column 1 Class.dlrs_CampaignMemberTest.testTrigger: line 11, column 1
Warning:
dlrs_CampaignMemberTrigger:Test coverage of selected Apex Trigger is 0%, at least 75% test coverage is required
The text was updated successfully, but these errors were encountered: