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
Vivek ViswanathVivek Viswanath 

Governor Limit Issue

Hi,

I think I have a similar Issue

trigger Account_Set_Owner_OnLoad_Temp on Account (before update)
{
   
    for ( Account acct : Trigger.new )
    {
        acctIds.add(acct.Id);
    }
   
    List<Contact> contactList = new List<Contact>([Select Id From Contact where AccountId in :acctIds]);
   
if(!contactList.isempty())
{
     update contactList;
 }

}

This is  a simple code and just updates contacts for the account as I have an on update trigger on contact that just gets the account owner and sets it to the contact owner. However I run into an issue with account more than say 50 contacts at times even less than that. I read through the posts and saw that Spring 08 has a fix for this however I need an alternative now. I am not talking of 2000 but around 200 contacts here.

Regards

Vivek


Message Edited by Vivek Viswanath on 08-14-2008 10:38 AM
mikefmikef
V:

Lists can only have a 1000 rows of records.

When you get the error are you bulk loading/updating accounts each with 50 contacts?
Vivek ViswanathVivek Viswanath
No i am doing a simple update from the SF UI of one record thats why I am a little anxious


regards

Vivek


Message Edited by Vivek Viswanath on 08-14-2008 11:00 AM

Message Edited by Vivek Viswanath on 08-14-2008 11:01 AM

Message Edited by Vivek Viswanath on 08-14-2008 11:02 AM