You need to sign in to do that
Don't have an account?
Laxman1975
Help needed with Apex batch
Hi All,
I would like to create roll up summary of few fields from Account on account itself using Account Hierarchy.
Using below query I can get sum of booking upto 3 levels in account Hierarchy.
SELECT SUM(Booking__c)
FROM Account
WHERE (Id =:accountId) OR (ParentId =:accountId) OR (Parent.ParentId =:accountIds
We have 50K accounts and that need to be processed in Batch.
If I will do this in Batch with size 200 records then how to breakup above query so that Summary will be calculated only for accounts which are hierarchical connected?
Or is it that I need to process only one account record at a time.
Appreciate help on this or any other solution/work around for this. Thanks
Laxman
I would like to create roll up summary of few fields from Account on account itself using Account Hierarchy.
Using below query I can get sum of booking upto 3 levels in account Hierarchy.
SELECT SUM(Booking__c)
FROM Account
WHERE (Id =:accountId) OR (ParentId =:accountId) OR (Parent.ParentId =:accountIds
We have 50K accounts and that need to be processed in Batch.
If I will do this in Batch with size 200 records then how to breakup above query so that Summary will be calculated only for accounts which are hierarchical connected?
Or is it that I need to process only one account record at a time.
Appreciate help on this or any other solution/work around for this. Thanks
Laxman