Skip to main content
Hi there, need help, I wrote a query that returns 3 records. and I'm reading those records in the FOR loop to update record that matchs criteria, however this record iteration no happening, anything I'm missing in following code:

 

my question is, I put a debug before if, I epxcet 3 entries in the log but it just one.

 

List <Sales_Team__c> gst = [Select Sales_Team_Member__c,Primary__c,Producer__c,Opportunity__c,Email__c,Id

 

                                             From Sales_Team__c

 

                                             Where Sales_Team_Member__c IN: opportunityIdSet and  Producer__c = null];

 

for (Sales_Team__c OpptyGST : gst){

 

                     system.debug('Test GST Memebr# : ' + OpptyGST.Sales_Team_Member__c);                            

 

                if (OpptyGST.Sales_Team_Member__c == Oppty.Sales_Rep__c){

 

                    OpptyGST.Primary__c = true;

 

                    OpptyGST.Email__c = 'primary@gst.com';

 

                   

 

                } 

 

}
1 respuesta
  1. 11 jun 2015, 15:53
    This Answers Community is focused on configuration and design questions. Programmatic questions are best submitted to the developer forums at https://developer.salesforce.com where the forums and participants are geared toward programming troubleshooting and support.
0/9000