-
Getting Error when using map in Dynamic query:- System.QueryException: unexpected token: '(' in the SOQL query
Map<Id, Contact> mapOfIdVsContact = new Map<Id, Contact>();
for(Contact con : [Select Id from Contact])
{
mapOfIdVsContact.put(con.Id, con);
}String s = 'Select Id from Contact Where Id IN : maps.keySet()' ;
List<Contact> cont = Database.query(s);
System.debug('@@' + cont);Error:- Line: 37, Column: 1 System.QueryException: unexpected token: '('
Log In to reply.
Popular Salesforce Blogs
Keep your employees close and customers closer with Salesforce Customer 360 Truth
Customers are an integral part of any business. Therefore, customer satisfaction is always the topmost priority for any enterprise. To ensure customer satisfaction, one must…
Benefits of Salesforce CPQ Software for Your Sales Team
Customers don't want to be burdened with details about your sales process or the intricacies of your product catalog. The automation of business operations, especially…
E-Commerce: 5 Automation Examples to Help You Get Started
It's hard to imagine running an online store the old-fashioned manual way. First of all, because it wouldn't allow growth. The more orders, the more…
Popular Salesforce Videos
Salesforce Integration with Heroku
You can integrate Heroku and the Salesforce Platform in several ways, and choosing among them comes down to understanding your requirements and the capabilities of…
Sharing and Visibility With Salesforce
Watch this amazing to understand the Salesforce sharing model, and how to structure profiles, roles, and sharing rules to control visibility. Do let us know…
Salesforce Integration Tutorial | Integrate Salesforce with Apps | Salesforce Training
This Salesforce Integration Tutorial video by Edureka will help you understand what is Salesforce integration in detail. It will also address the various Salesforce integration…