the SELECT permission was denied on the object ‘FilteredActivityPointer’

While testing out some user profiles in a development environment, I was presented the following error when trying to run the Activity report, which is included with Microsoft CRM:


the SELECT permission was denied on the object ‘FilteredActivityPointer’

Digging into the problem, I opened SQL Server Management Studio and took a look at the permissions on the FilteredActivityPointer view:




This sure didn’t look right. So, I compared this to some other filtered views, and found that the other filtered views had permissions for the ReportingGroup and the CRMReaderRole from SQL Reporting Services.

To restore the privileges to this view, I ran the following script against the CRM database:

GRANT SELECT ON dbo.FilteredActivityPointer
TO [DYNAMICS\ReportingGroup
{0f55c689-67f1-4fba-93d5-231e488a960e}]
GO
I did the same for the CRMReaderRole:

GRANT SELECT ON dbo.FilteredActivityPointer
TO [CRMReaderRole]
GO

These simple scripts add the user specified to the view, and set the checkbox for the Select permission.

Here’s the result, which, upon testing, allowed users to run the Activity Report:



I suspect that this is due to a bug in the organization deployment process. This organization was not the default organization – I created a new Org for this project. Somehow, I think permissions did not get properly propagated to all the views.

There should be exactly one form in production for {ObjectTypeCode}

I had this error crop up today – the key phrase seemed to be:
“There should be exactly one form in production for 10009″ and, per the URL in the error message it seemed to be triggered on a request for an icon for a custom entity. Strange.


Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/26/2010 11:41:30 AM
Event time (UTC): 3/26/2010 3:41:30 PM
Event ID: 7a05487c52a4410ca2d7c0388566b66f
Event sequence: 124
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-4-129140911906159536
Trust level: Full
Application Virtual Path: /
Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\
Machine name: CRMSERVER

Process information:
Process ID: 3764
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: InvalidOperationException
Exception message: There should be exactly one form in production for 10009

Request information:
Request URL: http://CRMSERVER:5555/ORG/_Common/icon.aspx?objectTypeCode=10009&iconType=NavigationIcon&inProduction=1&cache=1
Request path: /ORG/_Common/icon.aspx
User host address: ::1
User: DOMAIN\User
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 3
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at Microsoft.Crm.Application.Platform.Customization.RetrieveInProductionOrganizationUIByOrgId(Guid organizationId, Int32 objectTypeCode)
at Microsoft.Crm.Application.Pages.Common.Icon.GetIconBits(Int32 objectTypeCode, IconType iconType, Boolean inProduction)
at Microsoft.Crm.Application.Pages.Common.Icon.ConfigurePage()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


A little digging showed that we had an incorrectly registered step in a plugin. Looking at the plugin registration tool showed that there was a step registered for one of our plugins for a Primary Entity of ‘none’. I think that while I was registering a step for pluging, I hit the tab key and the step window disappeared. I just opened a new Step registration dialog and proceeded on my happy way. Next time I’ll be more careful!

CRM Grid Editor – All done with Javascript

It’s not very often that I see something new for Microsoft CRM that really impresses me to the point where I feel like I need to tell everyone about it. After all, CRM 4.0 has been out in the wild for more than 2 years now, and in that time many people in the CRM community have contributed the add-ons, tricks and code snippets to fill in short-comings in the product, or generally improve it’s useability.

Today, however, is different. A colleague brought a blog post to my attention that really blew me away. The post is from Dave Berry, on his CRM Entropy blog, and it includes the code and instructions for implementing a feature that I’ve been missing in CRM since the v1.0 days: the ability to edit records in a list view, or grid.

We’ve built similar functionality using server-side technologies that have worked quite well. But they are complex and can be a challenge to implement. Dave’s code is built completely in javascript and is embedded behind buttons via the ISV.Config XML. We’ve tested it out on some dev machines, and it’s fast and very intuitive. Because it’s all handled via the ISV.Config, I believe this will work on CRM Online as well.

I can easily foresee this client-side extension becoming a staple of every CRM project we do. Congratulations, Dave, on a job well done!

New Whitepaper on Sharing Data Between CRM Deployments

The E2 Team at Microsoft (Enterprise Engineering) has released a new whitepaper and build guide about how to share data between two CRM deployments or organizations. The release can be downloaded here.

From the description:
While using a single CRM instance is probably the simplest way to accommodate the data sharing needs within an organization, using multiple instances of Dynamics CRM may be preferable in a number of scenarios. This release includes two documents, a white paper and a build guide, focused on sharing data across multiple CRM organizations. The white paper provides an overview of the levels of integration available for sharing data across multiple Dynamics CRM organizations, together with details about the techniques that are used for integration at the Application and Data levels, which include Web Services, Web Services-based solutions, Filtered Views, and SQL Server Replication. The build guide explains how to configure the Microsoft Dynamics CRM 4.0 April 2009 VPC base image to enable data sharing between a Publisher organization and multiple Subscriber organizations. The configuration demonstrates how to use Microsoft Dynamics CRM to maintain referential integrity between multiple organizations by leveraging Microsoft SQL Server 2008 transactional replication.