1
vote
Accepted
Querying CampaignMembers based on Lead fields
At first glance, your code is a lot more work than it needs to be. If we use Trigger.newMap instead of Trigger.new, we don't need the partners map. Consequently, we can dramatically reduce your code ...
1
vote
Unexpected Tokens on Test Class for Apex Trigger: What am I doing wrong to create a test class for this Trigger trying to deploy to Production?
You can't mix trigger code and unit test code into a single file. The "unexpected tokens" error comes from the fact that two files were apparently mixed together. You should have at least ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
class × 1069apex × 827
trigger × 229
unit-test × 206
visualforce × 98
soql × 55
batch × 45
code-coverage × 41
controller × 36
list × 34
method × 30
wrapper-class × 29
scheduled-apex × 23
json × 20
code × 18
map × 17
error × 16
before-trigger × 16
custom-object × 15
email × 14
dml × 14
managed-package × 12
deployment × 12
failing-tests × 12
string × 12