2

I am getting the following error when I run s Salesforce SOQL query with a standard account.
Query:

SELECT  ( SELECT Id, Subject FROM OpenActivities ORDER BY ActivityDate
ASC , LastModifiedDate DESC  LIMIT 500) FROM Account WHERE Id in (
'001b0000009owSN', '001b0000009owNo' )

Results:
MALFORMED_QUERY: Implementation restriction: activity aggregate relationships only allow security evaluation for non-admin users when a single parent record is evaluated

Same query under Admin account works well.

Similar query works well under Standard account:

SELECT  ( SELECT Id, Name FROM Contacts ORDER BY Email ASC  LIMIT 500)
FROM Account WHERE Id in ( '001b0000009owSN', '001b0000009owNo' )

How can the problematic query be re-written? Why does that limitation exists?

Thanks,

R.Epstein
  • 61
  • 1
  • 5
  • Same question on salesforce.stackexchange.com - http://salesforce.stackexchange.com/questions/32100/activity-aggregate-relationships-only-allow-security-evaluation-for-non-admin-us – Daniel Ballinger Apr 07 '14 at 21:09

0 Answers0