Skip to main content
I was running a class that had the following code ...

 

...

 

decimal DecisionMakerCounter = 0;

 

...

 

 List<Lead> theLeads = [select ID, status,  DecisionMakerCounter__c, HangupCounter__c, RingNoAnswerCounter__c, LastStatusOpenerDate__c, LastStatusOpener__c Lead where status != 'Open' and LastStatusOpenerDate__c < N_DAYS_AGO:15];

 

        for (Lead workLead : theLeads)

 

        {

 

...

 

             DecisionMakerCounter = workLead.DecisionMakerCounter;

 

...

 

             workLead.DecisionMakerCounter__c = DecisionMakerCounter + 1;

 

...

 

I tried running this through Developer Console.  It looked like it ran but there was no execution log and no changed data.  I found that Lead.DecisionMakerCounter__c was empty.  I filled that field with 0, reran the class and it worked fine.

 

This looks to be a similar problem like: 

 

http://salesforce.stackexchange.com/questions/4571/nullpointerexception-not-occurring-within-try-catch

 

Is this a bug or feature???
2 respuestas
  1. 20 oct 2014, 17:31
    Thanks for the response Susan,

     

    I understand that a Null cannot be added.  My issue is that a Null Exception was not thrown, my class simply did not run and there was no execution log.  Honest :)  All I did was assign 0 to the DecisionMakerCounter__c field in all Lead records and then it ran fine.
0/9000