You need to sign in to do that
Don't have an account?
Getting Error System.QueryException: unexpected token: '.' in dynamic query
I am getting error while running the page.
First time when i run the page it is working perfect, but when i am running next time(Record more then 11) getting this error:
Here is code which i wrote:
String accSizeInInteger='select id,name,OwnerId,RepCode__r.Name,Tax_ID_Type__c,Tax_ID__c from Account where RepCode__c= \''+repblast.Current_Rep__c+'\'' ;
if(ClientName!=null)
{
accSizeInInteger+=' and name like \'%'+ClientName+'%\'';
}
if(Type!=null)
{
accSizeInInteger+=' and Tax_ID_Type__c like \'%'+Type+'%\'';
}
if(doNotInclude.size()>0)
{
accSizeInInteger+=' and id not in '+doNotInclude;
}
List<Account> accListSize=new List<Account>();
accListSize=Database.query(accSizeInInteger);
Please help any one.
Thanks