You need to sign in to do that
Don't have an account?
Atiqah
Received error System.QueryException: unexpected token: s0000014qrPAAQ
Hi, I need help.
I received the below error
Here is the Apex code
I received the below error
EXCEPTION_THROWN [22]|System.QueryException: unexpected token: s0000014qrPAAQ
Here is the Apex code
public with sharing class toApproved { @AuraEnabled(cacheable=true) //public static list<ProcessInstanceWorkitem> getItemApprove(){ public static list<ProcessInstanceWorkitem> getItemApprove(id ActorId){ id actorid2 = ActorId; system.debug('Actor: '+ActorId); system.debug('Actor2: '+actorid2); String condition = 'ActorId = '+ActorId; system.debug('condition: '+condition); string query = 'select ProcessInstance.TargetObject.name, CreatedDate, CreatedBy.name, ActorId, Actor.name from ProcessInstanceWorkitem where ' +condition + ' order by CreatedDate limit 100'; system.debug('query: '+query); list<ProcessInstanceWorkitem> records = Database.query(query); system.debug('records '+records); return records; } }
Thanks,
Did you try the soql query execution which you got int debug logs for the query. Is it giving the same result?
I guess there is some issue in adding the condition only. Can you share the soql query which you are getting from debuglog?
Thanks,
I think we cannot put code like this. It wont capture actorId from the paremeter.
Below is the query from ' string query' I capture from debug log
I try to query above statement. This is error I received. I think it should be because of this line I change to this: Debug: Error message: