• SFNEWDEV
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hi

 

I am using the getSelected() function from the standard controller in a apex class and it breaks when a annual revenve filter is inserted for eg: 70000000 which is automatically converted to 7.0E7

 

The error I get is:

 

Account WHERE ((AnnualRevenue < 7.0E7)) ORDER BY Name ASC LIMIT 10000 ^ ERROR at Row:1:Column:51 unexpected token: E7

 

I am not sure how to fix this as the error is returned by a internal function. No help in debug logs and no error email either.

 

Any help would be greatly appreciated.

 

Hi

 

I have been looking at the various bulk trigger solutions regarding the "Too many SOQL queries: 101" error.

 

I'm not sure how to reorganise the following code to get over the SOQL limit as it needs to lookup two fields in a custome object. Would I use a map here? The code works but fails with a larger record set.

 

Thanks in advance.


trigger targetCompanyDuplicatePreventer on TargetCompany__c (before insert, before update) {

    for (TargetCompany__c tc : System.Trigger.new) {
        // Check if either Account or Target Company List is blank
        if (tc.Account__c == Null || tc.TargetCompanyList__c == Null){
            tc.Account__c.addError('Account or Target Company List cannot be blank. Please select a value.');
        }
        else {
   TargetCompany__c[] duplicateCheck = [select Id from TargetCompany__c where Id != :tc.Id AND Account__c = :tc.Account__c AND TargetCompanyList__c = :tc.TargetCompanyList__c];
   if (duplicateCheck.size() > 0){
    tc.Account__c.addError('Duplicate combination exists. Please enter unique values.');
   }
  }
    }
}

Hi

 

I am using the getSelected() function from the standard controller in a apex class and it breaks when a annual revenve filter is inserted for eg: 70000000 which is automatically converted to 7.0E7

 

The error I get is:

 

Account WHERE ((AnnualRevenue < 7.0E7)) ORDER BY Name ASC LIMIT 10000 ^ ERROR at Row:1:Column:51 unexpected token: E7

 

I am not sure how to fix this as the error is returned by a internal function. No help in debug logs and no error email either.

 

Any help would be greatly appreciated.

 

Hi

 

We are trying to move our source code to a new developer account and have created a unmanaged package to do so. The package errors out on installation in the new account and only provide this error code. 577855813-15223 (717204042)

 

Can you please explain where I can lookup this error code and how to fix it?

 

Kind Regards