Skip to content

CRM 2011 Views and Local Data Groups Example – Part II

September 16, 2011

Continuing the series of articles related to the CRM 2011 Views and Filters Toolkit, this article shows how to deploy System Views using the toolkit. You can find more information about the toolkit by selecting the Views Toolkit Category of this blog.

Note

See this note in the previous article.

Duplicate a Personal View into a System View

Sometimes I thought it would be great if the administrator could elect to promote a personal view into a system view, without having to configure the system view manually. This can be done through workflow by leveraging the CRM 2011 Views and Filters Toolkit.

My Extended Contacts” View

Let’s imagine that the user John Doe has created a view called “My Extended Contacts”; this view shows all active contacts that John has interacted with (i.e. for whom there are related activities that are also related to John).

See the picture below for the filter conditions:

“My Extended Contacts” View

“My Extended Contacts” View

The “My Extended Contacts” view is such a hit that we want to transform it into a system view available to everyone. Let’s create a workflow based on User, called “Create System View from Personal View”, as shown in the figure below:

“Create System View from Personal View” workflow

“Create System View from Personal View” workflow

The workflow is composed of three steps:

1) Retrieve personal view

This step uses the RetrieveView custom activity with the following parameters:

RetrieveView Parameters

RetrieveView Parameters

The only difference with the previous example is that for this one the User is the user the workflow runs on.

2) Check that a view was found

The RetrieveView custom activity has a return parameter called “Count of Views” which tells how many views were found. Before proceeding I should make sure that one view (and one only) was found:

Check return value of RetrieveView
Check return value of RetrieveView

3) Deploy System View

This last step uses the DeploySystemView custom activity with the following parameters:

Deploy System View parameters

Deploy System View parameters

  • When Existing: Error – This means that if a system view for contacts named “My Extended Contacts” already exists, the activity will throw an exception.
  • View Definition: View Definition(Retrieve personal view) – This is the actual definition of the view, which is set to the output parameter of the RetrieveView activity.

Test

Now select the John Doe user record and run the “Create System View from Personal View” workflow on it. You will have a new system view that is an exact replica of John Doe’s “My Extended Contacts” view.

Note that when deploying system views it is a good practice to work on the development or staging environments only, and deploy to production the views with their related entity (in this case Contact) through solutions.

Conclusions

This example is showing just the beginning of the potential of this toolkit, which can be used to do more complicated and powerful things around Personal Views, System Views, Filters, Filter Templates and Local Data Groups. More articles to come.

Alberto “Views-R-Us” Gemin

Advertisements
2 Comments leave one →
  1. Tom permalink
    January 13, 2012 18:38

    I am not able to import the solution into CRM 2011. I get an error that the .dll cannot be found? Please help.

  2. January 31, 2012 15:53

    Hi Tom, were able to fix this issue?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: