-
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
Smarter business with the AI-powered data scientist, Einstein Discovery
In this highly competitive market, organizations are constantly trying to analyze their data and make informed decisions to outrun their competitors. That is where data…
Elevating Patient Care with Salesforce Healthcare CRM
Healthcare businesses are under increasing pressure to provide individualized treatment while maintaining patient-centred, efficient, and compliant operations. To address these demands, Salesforce Healthcare CRM for patient management…
Salesforce Einstein Activity Capture Guide in 2024
Have you ever had issues maintaining accurate, up-to-date information between your Salesforce org and your clients? Einstein Activity Capture is here to work for you…
Popular Salesforce Videos
Tips for Importing Data in Salesforce
Data can be easily imported into Salesforce through various tools provided by Salesforce. Supported data sources include any program that can save data in the…
Salesforce Commerce Cloud Vs Shopify – Which One Is Better
If you own an e-commerce business in today's time, it becomes imperative to have a right-fit platform that helps you stand out from your competition…
Why Are Some of The World’s Biggest Brands Transitioning Towards Headless? | Salesforce
With the advancement of headless architecture, consumers can now enjoy an omnichannel shopping experience. But that's not all that headless commerce has to offer. Leading…