-
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
Provide the right solution | Salesforce & Tableau Integration
Imagine having an advantage that lets you understand your customers better than ever before. That's exactly what happens when you combine the might of Salesforce…
How to Use Salesforce Lightning Data Services
INTRODUCTION Lightning Data Service is a Lightning Component which behaves like a VisualForce Standard Controller in VisualForce Page to provide access to Database to display…
What is Salesforce Sales Cloud and What are its Features?
Any organization would require a number of Salesforce's products and services to support and manage its operations. Sales Cloud, Service Cloud, Marketing Cloud, Analytics Cloud,…
Popular Salesforce Videos
How Do You Create Sandboxes in a Professional Edition in Salesforce?
Eric Stafford asks, “How do you create Sandboxes in a Professional Edition?” and gets an expert answer and demo from LeeAnne Rimel, Architect, Admin Evangelism…
Break up Salesforce Record Detail into Tabs | Salesforce Lightning Page Layouts
In this video, Signiforce briefs about how to create an Action with a subset of fields from your object and then add this action to…
Creation Of An Object In Salesforce | Salesforce Custom Objects
In this video, you will learn how to create a custom object in Salesforce, along with verification of the custom object in Salesforce. The following…