• Avin
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 4
    Replies

I have a batch process setup that could process upwards of 300,000 contact records.  Do to governor limits, I've setup my code to use batch apex.  All my code is working except for the query call.  

 

TerritoryRefreshBatch trb = new TerritoryRefreshBatch();
trb.query = 'SELECT Id, AccountId, MailingPostalCode, IM_Territory__c, EM_Territory__c, RatingOverride__c ' +
							'FROM Contact ' +
							'WHERE MailingPostalCode IN \'' + zCodes + '\'' +
							'AND RecordTypeId IN \'' + rtIds + '\'';
string batchId = Database.executeBatch(trb);

Syntactically, it's saves but when I exectuce the batch I get a "First error: unexpected token: '{012d0000000Ssj3AAC, 012d0000000Ssj8AAC}'".  That token is my set<string> of values I need for the dynamic query.

 

If I modify my query to pull a specific record, everything processes fine.  So, my question is, how do I structure my query string when using the "IN" clause?

 

Hi,

 

In opportunity, I a have 3 record types. For one of the recordtype I want to prefill the Closedate.

So,  am trying to override the New Button.

As I have to select the record type also. So I am not skiping the select record type page while overriding the New standard button.

 

In the action method the return URL which I have mentioned is 

'/006/e?RecordType='+opp.recordtypeid+'&opp9=7/22/2013'

 

But the returned URL is

https://c.cs11.visual.force.com/apex/IPPOpportunity?retURL=%2F006%2Fo&RecordType=012G0000000wkAk&ent=Opportunity&save_new=1&sfdc.override=1

 

 

I am able to redirect to the standed creation page of opportunity. Please help me to resolve the issue.

 

Thanks,

 

I have a field called Co-ownere in "Account" Object where I need to query from the field.

 

In the field I have 2 owner value seperated with ';'.

So I want to know What I need to do So that I can divide the values into 2 values.

 

How I can do it.

 

Is the approach that I am doing is right or any other way that is there to have 2 other owner in account object

Hi,

 

In my lead object I have created Rich text Area fields to store the images.

 I want to use this field in my VF page but I want a fixed size of image. 

 

When I am using that field in my VF page, actual size of Image is coming. I have used the Style sheet to resize the image but it is not working.

 

Please help me to resize the image present in Rich Text Area field.

 

Thanks,

Avinash