You need to sign in to do that
Don't have an account?
Vivek 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
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
Lists can only have a 1000 rows of records.
When you get the error are you bulk loading/updating accounts each with 50 contacts?
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