function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VenkatNYCVenkatNYC 

How to write SOSL with Where condition 16 digit number

Hi,

I have a SOSL with where condition. The conditiion works great for small numbers, when I use 16 digit number which I need in the where condition, it gives me error. I used it directly or convert to a double variable and use it in SOSL I get the error either way.

 

the numberfield__c is of Number type with 16 digits.

 

String searchquery ='FIND \' 4827557037571070 \' IN ALL FIELDS RETURNING CustomObject__c(field1__c, field2__c, numberfield3__c   where numberfield__c = 4827557037571070)';

List< List<SObject> >searchList=search.query(searchquery);

 

another one I tried is 

 

double dvar= double.valueof(' 4827557037571070 ');

String searchquery ='FIND \' 4827557037571070 \' IN ALL FIELDS RETURNING CustomObject__c(field1__c, field2__c, numberfield3__c   where numberfield__c = '+dvar+')';

List< List<SObject> >searchList=search.query(searchquery);

 

 

 

SOQL works great. How to make it works with SOSL?

 

 

Message Edited by VenkatNYC on 08-24-2009 06:48 AM
Message Edited by VenkatNYC on 08-24-2009 06:50 AM