function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger AccountT on Account (before update) { private Account[] oldval = Trigger.old; private Account[] newval = Trigger.new; if (oldval[0].Parentid != null) { if( oldval[0].ownerid != newval[0].ownerid || oldval[0].Parentid != newval[0].Parentid) { string Groupid = oldval[0].parentid; newval[0].parentid = null; Integer Count = [Select count() from Account a where a.Parentid = :Groupid]; if (count < 3) { Account[] delrec = [ Select b.Id from Account b where b.id = '0017000000NNNOSAA5']; delete delrec[0]; } else { System.debug('Group is good'); } } } else { System.debug('Not part of group'); }
}
This is the simple thing that i was doing.. I am not familiar with bulk processing.
Can someone help me with this.
Thanks
This is the simple thing that i was doing.. I am not familiar with bulk processing.
Can someone help me with this.
Thanks