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

question on list syntax
Anyone know how I can add a soql statement to this:
public void createEngagementWhenNeeded1(List<Opportunity> opportunities)
Basically that's a list of opps. Is it possible to adda soql statement to that, like this:
List<Opportunity> opps = [SELECT Id,Services_to_be_Delivered_by__c,Probability,Threshold__c,Account.Id,Account.Name,Region__c,
CreatedById,Account.Region__r.OwnerId,Account.Region__r.RSA_Manager__r.Id,Professional_Services__c,
Name From Opportunity];
Not sure how to get that to work.
You dont seem to have a where clause
All Answers
Well not sure about the question!
do you want to pass a value to this method ?
It should be something like
or
Thanks a lot.
Probably did a bad job explaining what I'm trying to do so sorry about that.
Basically I've got this need: Create 1 custom object record, when an opportunity is insertred or updated to meet a couple basic criteria.
So I've got a trigger that calls a class to do this.
Here's my trigger, followed by the class:
Class:
This thing works in the UI. However it's not working when I test by inserting more than 200 opps that fire the trigger. Nothing fails, but what happens is 2 records get created for every inserted opp, instead of just one.
I THINK my problem is in the class. Actually I'm almost positive that's the problem. Any idea what I'm doing wrong there that would cause this thing to crete 2 records instead of 1 for every inserted opp?
Thanks so much for your help!
You dont seem to have a where clause
Bingo. Thanks