-
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
What are Rendered, Rerender, RenderAs Attributes? | Salesforce Guide
Let us learn about Rendered, ReRender, and RenderAs attributes: Rendered This attribute is used to display a particular field or section based on Boolean value.…
Salesforce Security using CRUD , FLS & Sharing Rules | Salesforce Guide
Salesforce is a cloud-based Customer Relationship Management (CRM) platform that allows businesses to manage their sales, marketing, and customer service activities in a more efficient…
Salesforce App Builder Certification: Bridging the Gap Between a Programmer and an Administrator
Salesforce has been coming up with new certifications every now and then to evaluate and test the knowledge of individuals on different functionalities and features…
Popular Salesforce Videos
Salesforce Trailblazer Answers Leaders on YouTube
At Salesforce we’re using the power of our Trailblazer Community with Slack Connect to scale self-help content creation. Watch this short video to learn how…
Salesforce Workbench | Salesforce Tutorial Video
In this video, we show you how to use Salesforce Workbench to set a user password. This can be useful when you have a user…
Build a Discount Calculator | Trailhead - Autolaunched Flow Salesforce Example
In this video, I'm creating a Discount Calculator with the help of Salesforce Flow to Automate Your Business Processes with Lightning Flow. So it's a…