• Phani
  • NEWBIE
  • 5 Points
  • Member since 2010
  • Architect
  • Capgemini

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
We have a requirement from the customer that we'd like to maintain one Knowledge Base and need to share multiple Salesforce production instances. Can you pls let me know the best solution.
  • June 10, 2015
  • Like
  • 0

Hi,

 

Can anyone give the solution for the following issue:

 

I created a custom object called xyz__c, which has more than 50k + records. I'd like to process all these records in the Batch job. This code in inside the start(....) method and the return type is List<SObject>.

 

Note: I found some issues with the QueryLocator and so I'm using List<SObject> as a return type.

 

Error: 19:5:19.106|EXCEPTION_THROWN|[86,38]|System.Exception: Too many query rows: 10001

 

 

Source code:

 

List<SObject> rList=new List<SObject>();

 

for( List<SObject> rr:[SELECT Id,Name,OwnerId,RecordTypeId,RecordType.Name,Account__c,WebID__c,WebID__r.Status__c,

                    Type__c,Review_Frequency__c,

                    Month__c,Due_Date__c,Stop_Clone_Date__c,Status__c,Recommendations__c,Recommendation_Status__c,

                    ProCare_Health__c,DAP_Health__c, 

                    Submitted_Directories__c,Site_Check_Status__c,Previous_MM_Record__c, Previous_MM_Record__r.Id  

                     FROM xyz__c

                     WHERE (CALENDAR_MONTH(Month__c) = :this.cloningMonth AND 

                            CALENDAR_YEAR(Month__c) = :this.cloningYear AND    

                            Stop_Clone_Date__c = NULL  AND 

                            Review_Frequency__c = :this.reviewFrequency AND

                            WebID__r.Status__c = :this.webIDStatus  AND 

                            UniqueID__c NOT IN :previousMMrecordList)

                     ORDER BY Id ]){

                 

rList.addAll(rr);  

}   

 

  • July 23, 2010
  • Like
  • 0

We are looking for a developer to help with custom dashboard reports, training, and salesforce implementation planning. This will be a small short-term project. Please email Rita@WaldronHR.com with an attached resume if you are interested. 

 

We are looking for someone local to Seattle, WA.

 

Thanks, Rita. 

  • August 12, 2010
  • Like
  • 0

If I issue a SOQL query that includes aggregate functions, I get back a list of AggregateResult objects. From each of those, I can use ar.get('fieldname') to get the various values. But that assumes I know the names of the field. If I do a Dynamic SOQL query from a VF page controller, where the query is based on input from the user, I may not know the field names ahead of time. How can I determine the fieldnames to use when I want to access the contents of an AggregateResult object?

 

Having read that an AggregateResult is a special type of SObject, I tried using Dynamic Apex to discover the fields:

 

List<AggregateResult> lst = database.query('select count(id), grp__c from myobj__c group by grp__c');

Schema.SObjectType sot = lst.getSObjectType();
Schema.DescribeSObjectResult res = sot.getDescribe();
Set<String> setFields = res.fields.getMap().keyset();
System.debug('Fields are: ' + setFields);

But the only field I get back is "id."  

 

Thanks for your help!

  • July 28, 2010
  • Like
  • 0

Hi,

 

Can anyone give the solution for the following issue:

 

I created a custom object called xyz__c, which has more than 50k + records. I'd like to process all these records in the Batch job. This code in inside the start(....) method and the return type is List<SObject>.

 

Note: I found some issues with the QueryLocator and so I'm using List<SObject> as a return type.

 

Error: 19:5:19.106|EXCEPTION_THROWN|[86,38]|System.Exception: Too many query rows: 10001

 

 

Source code:

 

List<SObject> rList=new List<SObject>();

 

for( List<SObject> rr:[SELECT Id,Name,OwnerId,RecordTypeId,RecordType.Name,Account__c,WebID__c,WebID__r.Status__c,

                    Type__c,Review_Frequency__c,

                    Month__c,Due_Date__c,Stop_Clone_Date__c,Status__c,Recommendations__c,Recommendation_Status__c,

                    ProCare_Health__c,DAP_Health__c, 

                    Submitted_Directories__c,Site_Check_Status__c,Previous_MM_Record__c, Previous_MM_Record__r.Id  

                     FROM xyz__c

                     WHERE (CALENDAR_MONTH(Month__c) = :this.cloningMonth AND 

                            CALENDAR_YEAR(Month__c) = :this.cloningYear AND    

                            Stop_Clone_Date__c = NULL  AND 

                            Review_Frequency__c = :this.reviewFrequency AND

                            WebID__r.Status__c = :this.webIDStatus  AND 

                            UniqueID__c NOT IN :previousMMrecordList)

                     ORDER BY Id ]){

                 

rList.addAll(rr);  

}   

 

  • July 23, 2010
  • Like
  • 0

Hi all,

 

I am not getting any error emails for the unhandled exceptions on my email-id even i already have enabled this option in personal information using [Send Apex Warning Emails checkbox].

 

This is happening from last few days only and before that i was getting all the errors correctly on my email-id.

 

 

Any help will be appriciated.

 

Thanks in advanced.