Is there a reason why my soql doesnt return any value when i query this object Entitysubscription in a nested query.It returns value when i run as system admin,but not other users

(query is dynamic as well) as below

selectQuery = 'select name,Total_Number_of_Members__c,lastmodifieddate,( Select SubscriberId ,parentid From feedsubscriptionsforentity  where parentid in :ids limit 1000) from test__C where id in :ids';

Any fix for this?

On debugging as non-sys admin user,i can see no data is fetched

I am trying to find total number of followers for this record,and whether running user follows this record.if there is a way to achieve this other than this?


Based on information you provided I can only assume: There is empty Set, or user don’t have access to those objects, there is wrong relation name etc.

additional: Why you need these ‘WHERE’ in nested query? Why you need to use dynamic query? Because as I can see there is no point for that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.