-
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
Salesforce Summer '21 Release Highlights
Calling all fans of summer! Salesforce has packed their platform with exciting new Summer ‘21 Release features that all orgs will be experiencing by June 11-12, 2021.…
Tips to Choose Reliable Salesforce Consulting Partners in 2019
Salesforce now helps enterprises to streamline various facets of a business ranging from sales to product delivery and customer support. Salesforce is so popular for…
Apex Testing in Salesforce Made Simple: What You Need to Know
Hey, buddy good to see you! By the end of this one, you will be able to answer some of the questions on the basis…
Popular Salesforce Videos
Driving Gamified Interactions on Salesforce Communities With ScoreNotch | Use-Cases
A Salesforce native and lightning-ready product that makes gamification more dynamic and engaging. It encompasses powerful features that boost community engagement and ROI. Do let…
Contact Deletion in Salesforce Marketing Cloud
Cameron Robert from Datarati talks through how the Contact Delete function works, how to use it, and a practical demo of how to build a…
How to Take Your Salesforce Support Model to the Next Level
Jeremy Muldoon, the Salesforce expert at Rimini Street, discusses the Salesforce resource challenges faced by businesses today, how to overcome them, and how to take…