You need to sign in to do that
Don't have an account?
sivaext
SOQL Query Limit
Hi ,
I have requirement to build custom reports for sales people performance for current financial years. We have going display data based user selection but each user's data crossing 60,000 + records. As per SOQL query limit for rows is 50000.
Please help to handle this situation?
Thanks
SIva.
I have requirement to build custom reports for sales people performance for current financial years. We have going display data based user selection but each user's data crossing 60,000 + records. As per SOQL query limit for rows is 50000.
Please help to handle this situation?
Thanks
SIva.
[1] http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_ReadOnly.htm
I am going to build using VF because standard report interface not meet client's requirement.
If your issue is solved, please select a best answer to remove this question from the unanswered queue
I see 2 options here, both of them using a batch.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
1) If each user need updated information:
For that you can create the VF page to ask the email of the user and have a button that will fire the run of a Batch. This page will say "You will get an email when your data its calculated"
In the batch you can split the data in smaller groups, 10k at the time for instance.
Once Batch completed, you can send an email in the finish method to the user, in that method you will sent the link of a second VF page, that second page will display totals.
2) Partally Live data
If you want this live, you can ask that batch run to be executed every X hours, depending on clientes need can be once a day or once a week. And in the visual force page you show the informationa and a message "Data From XXXX date at XXX time".
In both cases you should use the "SystemModStamp" or another date field to only porcess records that were not counted in the last summary.
I hope this helps.
Bill,
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.