function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
//Add your query fields to List List<String> fields = new List<String>{ 'Id', 'Id', 'Name' }; //Construct query String soql = 'SELECT ' + String.join(fields, ',') + ' FROM customObject__c' + ' WHERE Enrollment_Status__c IN (\'Matriculated\', \'Admitted\')'; // Search String query builder if (String.isNotEmpty(termFilter)) { soql += ' AND Id = \'' + termFilter + '\''; } // Search String query builder if (String.isNotEmpty(termCampusFilter)) { soql += ' AND Name = \'' + termCampusFilter + '\''; } soql += ' ORDER BY motivis_lrm__Student__r.Name'; system.debug('>>>>>>>>>>>>>>>'+soql); studentsList = Database.query(soql);
public with sharing class test1 { public String userLogic { get; set; } public String output { get; set; } public String filter1 { get; set; } public String filter2 { get; set; } public String filter3 { get; set; } Map<Integer, String> filterMap = new Map<Integer, String>(); public void createLogic(){ filter1 = 'Industry__c = \'Agriculture\''; filter2 = 'Region_c = \'Asia\''; filter3 = 'Partner__c = true'; filterMap.put(1, filter1); filterMap.put(2, filter2); filterMap.put(3, filter3); } public PageReference parseLogic(){ if(String.isNotBlank(userLogic)){ String query = 'SELECT Id, Name FROM MyObject__c '; output = userLogic; for(Integer i = 1; i <= filterMap.size(); i++){ if(output.contains(String.valueOf(i))){ output = output.replace(String.valueOf(i),filterMap.get(i)); } } query += ' WHERE (' + output + ') '; query += ' LIMIT 100'; output = query; } return null; } public test1(){ createLogic(); } }
I hope you find the above solution helpful. If it does mark as best answer to help others too.
Thanks,
Ramesh D
Please check out the given link :
-http://www.salesforceben.com/salesforce-reports-url-hack/
-http://www.tgerm.com/2011/04/passing-params-to-reports-salesforce.html
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha