You need to sign in to do that
Don't have an account?
Rolando Esteves
Opportunity Trigger
Hi! Im currently working on a trigger in order to find the xtra information of the Opportunity Owner. If Someone can help me with the part im missing from my code it would great!
Thanks in advance!
REG
Heres my code :
trigger accountManager on Opportunity (before insert) { // Create a set of userids set<ID> L_am = new set<ID> (); for(Opportunity opp: Trigger.new) { L_am.add(opp.OwnerId); } // Query the user table to grab the information needed if(!L_am.isEmpty()) { User[] L_user = [SELECT Name, Email, Phone FROM USER WHERE Id IN:L_am]; } }
Done: