Untitled
unknown
plain_text
3 years ago
628 B
7
Indexable
public class esenic { public static void getuser(list <account>d ){ AggregateResult[] f=[select count(id) contatore,ownerid from account group by ownerid order by count(id)]; integer contatore; for(account a:d){ contatore=0; for(integer i= 0;i <f.size();i++){ if(a.ownerid==f[i].get('ownerid')){ contatore=(integer)f[i].get('contatore'); } } if (contatore>20) a.ownerid=(id)f[0].get('ownerid'); } } }
Editor is loading...