You need to sign in to do that
Don't have an account?
sfdcFanBoy
Im getting the following error
System.QueryException: unexpected token: '{'
here's the simple code.
dynamic soql : unexpected token '{'
Im getting the following error
System.QueryException: unexpected token: '{'
here's the simple code.
Set<Id> sId = new Set<Id>{}; sId.add('a0df000000063A9AAI'); sId.add('a0df00000006P2cAAE'); String squery = 'SELECT Id, Name FROM Engagement__c WHERE Id IN:'+sId; List<Engagement__c> lst = database.query(squery); System.debug('----list size:'+lst.size());
Sonam_SFDC
Please use Set<Id> sId = new Set<Id>(); instead of Set<Id> sId = new Set<Id>{};