You need to sign in to do that
Don't have an account?
Hi,How can i use the method parameter in LIKE query to perform substring operation?Help is appreciated in advance.
My code is as follow:
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
or you can use dynamic query string also
All Answers
or you can use dynamic query string also