• Jonathan I
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

So I've got this great little VF page that perfectly meets the needs of our users when embedded in the standard Account page layout. The problem is, it doesnt work for non-admin users.


It's basically just a data table generated from:


<apex:dataTable value="{!Account.ActivityHistories}" var="a" rows="5" columns="5" columnswidth="10%,10%,10%,10%,60%"  rules="rows" width="100%" bgcolor="#F3F3EC" cellpadding="3px" cellspacing="2px">



When the Account page is viewed by a non-admin user though, the page returns:


Content cannot be displayed: MALFORMED_QUERY: Implementation restriction: activity aggregate relationships only allow security evaluation for non-admin users when LIMIT is specified and at most 500

 Ok, seems pretty self explanatory, just need to limit the query. But how? I'm only asking for the 5 most recent. I'm really hoping I don't have to write an extension just for this.


Any thoughts?