function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
elmaschingondeguateelmaschingondeguate 

Parent relationship queries are not allowed

 

Hi All,

 

I am really new to this and I am trying to query the EntitySubscription object to get the names of the accounts that a user is following. I am using Workbench for this, but when I keep getting the error

 

Parent relationship queries are not allowed

 

The query I am using is:

 

SELECT Id,ParentId, Parent.Name FROM EntitySubscription WHERE SubscriberId = '005A0000000dt16'

 

Any help will be greatly appreciated.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Rahul SharmaRahul Sharma

This query was not alowed previously but it can be used in Apex class with version above 20,

also it works in system log, run this in system log and check the output:

 

system.debug('==query=='+[SELECT Id,ParentId, Parent.Name FROM EntitySubscription]);

 

All Answers

Rahul SharmaRahul Sharma

This query was not alowed previously but it can be used in Apex class with version above 20,

also it works in system log, run this in system log and check the output:

 

system.debug('==query=='+[SELECT Id,ParentId, Parent.Name FROM EntitySubscription]);

 

This was selected as the best answer
elmaschingondeguateelmaschingondeguate

Thanks Rahul :smileyvery-happy:

Rahul SharmaRahul Sharma

you are most welcome :)