You need to sign in to do that
Don't have an account?
Rakesh R
Value of filter criterion for field must be of type double and should not be enclosed in quotes
Hello folks,
I am writing a dynamic query and comparing a formula(Ineger) field called Age_of_Call_in_Days_abv__c in my object, but getting bellow error.
"System.QueryException: value of filter criterion for field 'Age_of_Call_in_Days_abv__c' must be of type double and should not be enclosed in quotes"
Below codes which am writing
String orgName = 'Agri';
String profileId='00eF0000000yQWE';
Double minAge = 7.0;
Double maxAge = 30.0;
String query = 'Select Id, Name, Call_Type_vod__c,Account_vod__c, Age_of_Call_in_Days__c, Late_Submission_Approval_Status_abv__c, from Forma__c'
+ ' where Organization_abv__c !=\'' + orgName +'\''+
' AND owner.ProfileId =\'' + profileId + '\''+
' AND Age_of_Call_in_Days__c>=\''+ minAge + '\''+
' AND Age_of_Call_in_Days__c<=\''+ maxAge + '\'' + ' LIMIT 2';
Please help me.
I am writing a dynamic query and comparing a formula(Ineger) field called Age_of_Call_in_Days_abv__c in my object, but getting bellow error.
"System.QueryException: value of filter criterion for field 'Age_of_Call_in_Days_abv__c' must be of type double and should not be enclosed in quotes"
Below codes which am writing
String orgName = 'Agri';
String profileId='00eF0000000yQWE';
Double minAge = 7.0;
Double maxAge = 30.0;
String query = 'Select Id, Name, Call_Type_vod__c,Account_vod__c, Age_of_Call_in_Days__c, Late_Submission_Approval_Status_abv__c, from Forma__c'
+ ' where Organization_abv__c !=\'' + orgName +'\''+
' AND owner.ProfileId =\'' + profileId + '\''+
' AND Age_of_Call_in_Days__c>=\''+ minAge + '\''+
' AND Age_of_Call_in_Days__c<=\''+ maxAge + '\'' + ' LIMIT 2';
Please help me.
I can't find 'Age_of_Call_in_Days_abv__c' in your dynamic SOQL. Could you also share the formula you have used in the field?
i change the field name with 'Age_of_Call_in_Days__c' instead of 'Age_of_Call_in_Days_abv__c,.
after that i am getting below error.
"System.QueryException: value of filter criterion for field 'Age_of_Call_in_Days__c' must be of type double and should not be enclosed in quotes"
Use below query :