Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private List<Product2> performSearch(string searchString) {
- String soql = 'Select Id, Name, PriceBook2Id, Product2Id, ProductCode from Pricebookentry where PriceBook2Id =: Qid';
- if(searchString != '' && searchString != null){
- soql = soql + ' AND Product2.name LIKE '%' + searchString +'%' ';
- }
- if(BrandsearchString != '' && BrandsearchString != null){
- soql = soql + ' AND Product2.brand1__c LIKE '%' + BrandsearchString +'%' ';
- }
- if(GroupsearchString != '' && GroupsearchString != null){
- soql = soql + ' AND Product2.Group1__c LIKE '%' + GroupsearchString +'%' ';
- }
- return database.query(soql);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement