-
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
Become a Marketing Expert with Salesforce Marketing Cloud Certification
There is no wonder that Salesforce Marketing Cloud is a powerful marketing automation platform that enables businesses to engage with their customers on a more…
Top Salesforce Spring '23 Release Features
The wait is finally over. Salesforce Spring '23 release features are here and we cannot wait to discover the outstanding releases. As we know by…
What is Salesforce Community Cloud?
In today's fast-paced business environment, maintaining strong relationships with clients and partners is crucial for success. Salesforce Community Cloud has emerged as a dynamic solution…
Popular Salesforce Videos
Campaigns in Salesforce | Salesforce Tutorial
Salesforce describes campaigns as “a marketing tactic (or series of tactics) that are designed to achieve specific goals such as increased revenue, leads, adoption, etc.”…
Simplified Non-Functional Testing for Salesforce Developers
Testing is indispensable to measure, optimize performance, and improve user experience. Watch this video to see how you can measure performance across physical mobile devices…
Salesforce Multifactor Authentication Webinar
An extra layer of security on your Salesforce org is always worth it. Learn how to safeguard your sensitive Salesforce account information from unauthorized access…