function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Greg HGreg H 

Possible Bug with Summer 08?

We wrote a trigger on Account to update child records when the NoOfEmployees value is updated by a user.  The trigger is currently running and works as desired in our production org (na2 & still on winter release).  When our Sandbox was upgraded to Summer 08 we went in to look through the functionality, in general, and found that this same trigger is not working the same way.
In both orgs the trigger fires and updates the related records. In na2 any account record changes are saved but in tapp0 the account changes are not saved - the values return to the pre-update values.
trigger PushEmployees2AccountProductLine on Account (before update) {
 Map<Id, Account> acctsWithNewEmplCnt = new Map<Id, Account>();
 for (Integer i = 0; i <; i++) {
  if(Trigger.old[i].NumberOfEmployees !=[i].NumberOfEmployees){
 List<Account_Product_Line__c> updatedAPL = new List<Account_Product_Line__c>();
 for (Account_Product_Line__c apl : [SELECT id, Account__c, Employees_Here__c FROM Account_Product_Line__c WHERE account__c in :acctsWithNewEmplCnt.keySet()]) {
  Account parentAccount = acctsWithNewEmplCnt.get(apl.account__c);
  apl.Employees_Here__c = parentAccount.NumberOfEmployees;
 update updatedAPL;

I am not sure if the problem is in the trigger we wrote or if there is a possible bug in the summer release.  Does anyone have any ideas?
Turn on the Debug Log and try your test case that way.  Could it be a validation rule is killing your trigger?  A debug log will tell you.
Greg HGreg H
Just following up on my original post. I was never able to resolve the issue with my Trigger and I've now escalated this issue to Tier 3 at They have been able to replicate the issue but are not sure how to fix yet. Since the org will be upgraded to Summer '08 tomorrow night, they are working on this urgently and would like to have an answer or a plan to address the issue in the next day. I will follow up when I know more...