Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trigger CopyToOpportunity on Account (after insert, after update) {
- List<Opportunity> opportunityList = new List<Opportunity>();
- for(Account ac : Trigger.New) {
- for(Opportunity opp : [select Source__c from Opportunity where accountid = :ac.id]) {
- opp.Source__c = ac.Source__c;
- opportunityList.add(opp);
- }
- }
- update opportunityList;
- }
Add Comment
Please, Sign In to add comment