You need to sign in to do that
Don't have an account?
aqeel ahmad
Different field have different data type so what should i do?
if(field == 'StageName')
soql = 'Select' + ' '+field +' '+',Amount from Opportunity where ' + field +Operator+'\''+Val+'\'';
if(field == 'Amount')
soql += val;
runQuery();
since amount is integer field and stage is string type so how to manage the query?
soql = 'Select' + ' '+field +' '+',Amount from Opportunity where ' + field +Operator+'\''+Val+'\'';
if(field == 'Amount')
soql += val;
runQuery();
since amount is integer field and stage is string type so how to manage the query?
use this to get data type
write logic for that .
Schema.DisplayType dt = Schema.sObjectType.Account.fields.AnnualRevenue.getType();
replace account palce to sobject and replace annual revenue place uour selectd field .
Regards,
Harish.R.