+ Start a Discussion
MTBRiderMTBRider 

Bug or undocumented change in Winter 15 for Activities History lookups

I am seeing an issue with Activities History since my client's org got upgraded to Winter 15 over this last weekend.  Look at the sample VF page below:
<apex:page standardcontroller="Account">
	<apex:pageBlock title="Testing Activities History" >
	 	<apex:pageBlockSection title="Activities History in pageBlockTable use to work before Winter 15">
			<apex:pageBlockTable value="{!account.ActivityHistories}" var="x">
				<apex:column value="{!x.Account.Name}"/>
				<apex:column value="{!x.subject}"/>	
				<apex:column value="{!x.status}"/>
				<apex:column value="{!x.owner.name}"/>
			</apex:pageBlockTable>
		</apex:pageBlockSection>
	 	<apex:pageBlockSection title="Activities History using relatedList tag">
			<apex:relatedList list="ActivityHistories" pageSize="10"/>
		</apex:pageBlockSection>
	</apex:pageBlock>
	
	<apex:pageBlock title="Testing Open Activities" >
		<apex:pageBlockSection title="Open Activities in pageBlockTable still works after Winter 15">
			<apex:pageBlockTable value="{!account.OpenActivities}" var="x">
				<apex:column value="{!x.Account.Name}"/>
				<apex:column value="{!x.subject}"/>	
				<apex:column value="{!x.status}"/>
				<apex:column value="{!x.owner.name}"/>
			</apex:pageBlockTable>
		</apex:pageBlockSection>
		<apex:pageBlockSection title="Open Activities using relatedList tag">
			<apex:relatedList list="OpenActivities" pageSize="10"/>
		</apex:pageBlockSection>
	</apex:pageBlock>
</apex:page>
There have always been restrictions on how you look up Activities History and Open Activities for non Admin users, but the two pageBlockTables worked for non Admin users before the Winter 15 upgrade.  After the upgrade, only the Open Activities pageBloackTable works for non Admin users.  The ActivityHistories pageBlockTable for a non Admin user will now return the error message:

Object type not accessible. Please check permissions and make sure the object is not in development mode: There is an implementation restriction on ActivityHistories. When you query this relationship, security evaluation is implemented for users who don't have administrator permissions, and you must use a specific sort order: ActivityDate DESC, LastModifiedDate DESC 

Since the pageBlockTable is just using the standard relationship lookup in this case, there is no opportunity to add the sort order to the query.  

I read through the Winter 15 release notes and cannot find anything about a change that might effect this.

Anyone else seeing this?

Salesforce, is this a bug?  

I need a resolution to this since my clients cannot use some functionality since this weekend due to this issue.  

Thanks
Jason YuJason Yu
I'm experiencing the same bug in my org, but for Activity Histories on the Contact.  We also noticed that it was working fine prior to the Winter 15 update.

"Object type not accessible. Please check permissions and make sure the object is not in development mode: There is an implementation restriction on ActivityHistories. When you query this relationship, security evaluation is implemented for users who don't have administrator permissions, and you must use a specific sort order: ActivityDate DESC, LastModifiedDate DESC"
MTBRiderMTBRider
I would suspect the issue is going to be on all activities histories regardless of whether it is for Accounts, Contacts, Opportunities, etc.

Have not heard from Salesforce yet...it would be nice to hear from them soon!