-
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
How 2 (Friends) Salesforce Developers Built a Million Dollar Company?
The founders of AnavClouds Software are both Salesforce professionals, doing well in their own spheres of work. They happened to meet through a common friend…
How To Plan For A Successful Salesforce Data Migration?
This blog on data migration planning features a brief into towards data migration planning process then it focuses on common data migration issues, the extension…
Popular Salesforce Videos
Customer Overview: How Our Customer Used Salesforce Industries i.e Vlocity For It’s Business?
Let's have a glance at our customer success story to understand what is Salesforce Industries in detail. Watch this video and do let us know…
Salesforce Account-Based Marketing Demo
Salesforce Account-Based Marketing is a partnership aligning Marketing, Sales, and Service around a single view of your top accounts. A partnership which reesults in long…
Salesforce Lightning Training
Here, the video is about the Salesforce Lightning Tutorial. These video covers comprise real-world projects that will introduce you to advanced concepts such as Lightning…