Tag Archive for CRM 2011

What is CRM 2011 R8?

The CRM 2011 Q2 Service Update known as R8 has been getting a lot of attention recently and for good reason. R8 has many exciting new features and enhancements to CRM 2011 including:

New Mobile Client

Microsoft will be offering a new Mobile Client from CRMMobility for CRM Online Customers. Unlike the old CRM Mobile which was very limited, Mobility is a truely feature rich client for mobile devices. The Mobility client brings a first class experience to your Phone or Tablet. The new client offers tight integrations with the iPad, iPhone, Blackberry, Android, and Windows Phones.

Cross Browser Support

The MSCRM web client will no longer be locked into just Internet Explorer. In addition to IE on Windows Machines you will be able to access CRM from the following web browsers and Operating Systems.

  Internet Explorer Firefox Google Chrome Safari
Windows Version 7+ Version 6+ Version 13+ Not Supported
Mac OS-X Not Supported Version 6+ Not Supported Version 5.1.1+
iPad 2 (iOS 5.x) Not Supported Not Supported Not Supported Version 5.1.1+

 

Activity Feed Enhancements

A number of enhancements have been made to the Activity Feeds to make them more engaging and foster a Social CRM experience.

You will now be able to “Like” and “Unlike” Activity Feed posts.

There are also a number of new filtering options, such as filtering by Record Type and based off of Data Views. A timeline wall can be used to view all posts that mention a user by using the @me filter. 

Industry Specific Solutions

Microsoft will also be releasing a number of solutions for specific industries including:

  • Life Annuity Insurance Sales
  • Non-Profit
  • Health Plan Sales
  • Wealth Management

These templates will give users an out of the box CRM tailored for their unique industry.

Support for SQL 2012

R8 will allow On Premise customers to harness the many performance improvements from SQL Server 2012. Girish Raja has a great post on the benefits of using CRM 2011 with SQL Server 2012.

There are very exciting Business Intelligence (BI) features in SQL Server 2012 like Power Pivot and Power Views. I’ve been looking forward to these new report visualizations since I first saw Hans Rosling’s Ted.

For more details on the features of R8 check out the R8 Release Preview Guide.

CRM Tool of the Week – CrmFetchKit.js

Last weeks Tool was the Custom Code Validation Tool which helps you identify unsupported code in your form scripts.  Keeping with the theme of preparing for Q2 2012 service update for Microsoft Dynamics CRM 2011 (R8) and cross browser support this weeks Tool of the Week is the CrmFetchKit.js . This JavaScript library will help you fix some of your unsupported code you may have found.

FetchXML and Cross Browser Support

One of the many differences between the different browsers is how they handle parsing through xml nodes or xml-traversing. A method that was used in some old form scripts for fetching data from CRM was the selectSingleNode. However, selectSingleNode is only supported in IE.

There is a good chance that any of your old FetchXML form scripts are not cross-browser compatible. If so you will want to update these scripts to use a javascript library like JQuery, which has great cross-browser support, to handle the XML traversing. That’s where the CRMFetchKit.js comes in.

The CRMFetchKit.js is built on top of JQuery and lets you easily get the results from a FetchXML query in your form scripts.

Fetch

The following shows a Basic Fetch using the CrmFetchkit.js

var fetchxml = ['<fetch version="1.0" output-format="xml-platform" mapping="logical">',
                ' <entity name="account">',
                ' <attribute name="name" />',
                ' <attribute name="accountid" />',
                ' <filter type="and">',
                ' <condition attribute="name" operator="eq" value="test" />',
                ' </filter>',
                ' </entity>',
                '</fetch>'].join('');

// Action: load the account with a certain name
CrmFetchKit.Fetch(fetchxml).then(function (results) {
    /* success handler */

}, onFetchError);

 

FetchMore 

The Fetch More method can be used for retrieving datasets. It includes a flag for more records.

The following shows a FetchMore using the CrmFetchkit.js. If there are more than 10 contacts with a last name like test% than response.moreRecords will be true.

var fetchxml = ['<fetch version="1.0" output-format="xml-platform" ',
                        'mapping="logical" ',
                        'returntotalrecordcount="true" ',
                        'count="10">',
                ' <entity name="contact">',
                ' <attribute name="lastname" />',
                ' <attribute name="contactid" />',
                ' <filter type="and">',
                ' <condition attribute="lastname" operator="like" value="test%" />',
                ' </filter>',
                ' </entity>',
                '</fetch>'].join('');

CrmFetchKit.FetchMore(fetchxml).then(function (response) {

    // get the logic-entity name
    var entityname = response.entityName;

    // the requires 'returntotalrecordcount="true" ' to be defined in the fetchxml
    var total = response.moreRecords;

    // get the entities as array
    var set = response.entities;

    // the page-cookie is required for paging
    var pageCookie = response.pagingCookie;

}, onFetchError);

FetchAll

The FetchAll method can be used for retrieving results from large datasets that exceed 5,000 records.

The following shows Fetch All using the CrmFetchkit.js

var fetchxml = ['<fetch version="1.0" output-format="xml-platform" ',
                        'mapping="logical" ',
                        'count="10">',
                ' <entity name="contact">',
                ' <attribute name="lastname" />',
                ' <attribute name="contactid" />',
                ' <filter type="and">',
                ' <condition attribute="lastname" operator="like" value="test%" />',
                ' </filter>',
                ' </entity>',
                '</fetch>'].join('');

CrmFetchKit.FetchAll(fetchxml).then(function (entities) {

    /* success-handler */

}, onFetchError);

What Else Can it Do?

In addition to Fetching results the CrmFetchKit.js can also assign records!

CrmFetchKit.Assign(recordid, 'entity', userid)

Download

You can download the CrmFetchKit.js from CodePlex

Setup

To use the CrmFetchKit.js you will need to create a new web resource and upload the CrmFetchKit.js file to it. You will also need to Download JQuery and create a web resource for JQuery. Make sure that you add both of these web resources to any forms you will be setting up FetchXML form scripts on.

You can then create form scripts based off of the sample code to Fetch data from CRM.

The following shows a basic fetch using the CrmFetchkit.js

CRM Tool of the Week – Solution Extender for Microsoft Dynamics CRM 2011

Components Missing from Solutions

Have you ever tried to move a component from one organization to another through a solution only to find that that it is not contained in the solution. It can be frustrating and no one likes to manually recreate things. Well the Solution Extender is here to the rescue. This tool lets you easily move some of those missing components.

With the Solution Explorer you can move:

  • Duplicate detection rules
  • Saved views (userquery)
  • Saved views (userquery) that will be converted to system view when importing

Download

You can download the Solution Extender project from Code Plex.

CRM Tool of the Week – POA Table Secret Decoder Ring

There are a couple tables in CRM that can be a real beast to work with. One of these tables is the PrincipalObjectAccess table, also know as the POA table. The POA table can be a pain to work with for 3 reasons:

  1. It’s Big
  2. It’s used by almost every query
  3. The Rights Mask values are hard to understand

There’s not much that can be done about the first two. But, thanks to CRM MVP Scott Sewell you can now easily encode and decode the Rights Mask values using his secret decoder ring.

What’s the problem with the Rights Access Mask?

The way CRM encodes the POA is no big secret. Each of the secrity permission like, read and write, has a value assocaited with it and they are all added together to calculate the rights mask value. At first it may seem like this would be a simple thing to enturpet, after all there are only a hand full of 9. But if you remember coin flipping excercises in math class this quickly adds up to 512 different possible values for the Rights Mask.

What does the Secret Decoder Ring do?

The POA Table Secret Decoder Ring is a simple to use Excel spreadsheet that Enodes and Decodes a Rights Mask Value letting. You can either set the security values in the left-hand column to get the Encoded Rights Mask value for that group of permissions or you can enter the Rights Mask value in the top of the right-hand column to see what set of permissions are for that value.

 

Download

You can Download the POA Table Secret Decoder Ring from http://db.tt/ORT57Q6s

 

More Information

For more information check Scott Sewell’s article on Customer Effective Blog

Creating a Dynamic IFrame

Have you ever wanted to add a webpage into one of your CRM forms?

Well here is how you can add a dynamic IFrame to your CRM Forms.

In the example below we will add an IFrame on the Account Form that will show the Bing search results for the Account. This same technic can be used to add IFrame to other sites, like a LinkedIn Search on the Contact Form.

Adding an IFrame to your Form

First things first, we will need to add a plain IFrame to our form. This can be done through the form editor by following the steps below.

  1. Open the Main Account Form in the Form Editor, select the Insert Tab and click on the IFRAME button.
  2.  Give your Form a name and set a static URL for the page to initially load. Then click Ok to add the IFrame to the form.
  3. Save and Publish the Form.

If you setup the IFrame above you should now see a the Bing Search website embedded in your form.

Adjusting the size of the IFrame

The default size of the IFrame is set to 6 Rows. While this keeps your screen real-estate open for other things like attribute fields, it may seem to small in many cases. You can increase the size of the IFrame by double-clicking the IFrame to go into its properties and selecting the Formatting Tab.

Make the IFrame Dynamic

Embedding a website into your CRM Form has limited uses without having it automatically pass some information from the form to the webpage like passing the IFrame a field value or id. Just showing the Bing website is not going to be very helpful. However, having it automatically show the results for the account can add value.

To do this we will need to add a Form Script that will get the Account Name and update the URL of the IFrame.

Adding a Web Resource

  1. In the Form Editor click on Form Properties from the Home Tab.
  2. Under Form Libraries Click on Add.
  3. Press New.
  4. Give the Web Resource a name and Display Name. Then select Type “JScript”.
  5. Click on the Text Editor and Enter the text below.
    function updateBingIFrame()
    {
    //get the name
    var accountName = Xrm.Page.getAttribute("name").getValue();
    //Check that there is a name
    if (accountName)
    {
    //Update the IFrame
    var bingIframe = Xrm.Page.getControl("IFRAME_Bing");
    var newUrl = "http://www.bing.com/?q=" + encodeURIComponent(accountName);
    bingIframe.setSrc(newUrl);
    }
    }
  6. Click Ok, Save and Close, then Ok.

Adding the Event Handlers

The Event Handlers are what determines when an action is triggered. There are three places you can have your Form Scripts triggered; OnLoad of the form, OnSave of the from, or OnChange of a field. First we will add an OnLoad Event Handler to update the IFrame when it loads. Then we will add an OnChange Event Handler so the IFrame will refresh if the name field is updated.

  1. Scroll to the bottom of the Form Properties window and Click on Add under Event Handlers. The Control should initially be set to Form and Event OnLoad.
  2. Select the Library you created in the steps above and enter the function name updateBingIFrame . Please note you do not need to add () at the end of the function, this will cause an error if you do.
  3. Click Ok.

Next, add the OnChange Event.

  1.  At the bottom of the Form Properties window set the Control to Account Name. Then click the Add button.
  2. Select the Library you created in the steps above and enter the function name updateBingIFrame . Please note you do not need to add () at the end of the function, this will cause an error if you do.
  3. Click Ok.

Save and Publish your form and you should now have a dynamic IFrame. If you open an account record you should see the IFrame loaded with the Bing results for that account. If you change the account name you should see it automatically refresh the results.

URL Encoding

Don’t forget to Encode your URLs. If not you may run into errors like the one below or you may notice that the string you are sending gets abruptly cut off.

The path of the item ‘/….’ is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath)

This is because particular error occurs when try to open a report and pass an & in one of your query string parameters. Since & is used to separate out each of the parameters your browser gets very confused if you include it in a parameter value without encoding it.

In our Example, if you had account name was AT&T you would see the search results for AT in the IFrame if your form script does not encode the account name.

You can easily encode the url using the built-in JavaScript functions encodeURIComponent() or encodeURI().

var NewURL = 'http://www.bing.com/search?q=' + encodeURIComponent(Xrm.Page.data.getAttribute("customernumber").getValue());

Warning: Not all sites will play well with IFrames

Have you ever noticed that all of the examples like the one above use Bing Live Search and not Google. That’s not just because CRM is a Microsoft product. If you attempt to setup a similar search IFrame using google you will discover that google does not allow you place their site within an IFrame. Be aware they are not the only ones.

 

 

CRM Tool of the Week – SiteMap Editor

Microsoft’s SiteMap Editor

There are a number of SiteMap Editors available for customizing the CRM SiteMap without having to go in and manually edit the XML. Even though you will not a tool built directly into CRM for editing the SiteMap their is a one built by Microsoft Dynamics Labs and not a third party solution.

Similar to the CRM Ribbon Workbench that I covered a couple weeks ago, the Microsoft SiteMap Editor is installed as a Solution and when you open up the solution you are presented with a WSIYWIG style editor that graphically lets you update the sitemap. No XML hacking required!

 

 

Download the Microsoft SiteMap Editor

You can download the Microsoft SiteMap Editor from PinPoint at: http://pinpoint.microsoft.com/en-us/applications/microsoft-dynamics-crm-sitemap-editor-12884928049

Other SiteMap Editors

There are a number of other sitemap editors out there, however as with most tools, I would recommend starting with the one offered by Microsoft and seeing if it meets your needs before venturing into any third party tools.

OpenSource SiteMap Editor

If you are looking for an open source solution, there is a sitemap editor available through codeplex.

http://sitemapeditor.codeplex.com/

CRM Tool of the Week – CRM 4 to CRM 2011 JavaScript Converter Tool

Upgrading from CRM 4.0 to CRM 2011

If you are planning on upgrading from Dynamics CRM 4.0 to CRM 2011 you will definitely want to download this tool. Microsoft did an excellent job with the upgrade process for upgrading an organization from CRM 4.0 to CRM 2001. You should test any custom programming like custom workflows and plugins, as there are some oddities to the backwards compatibility of the SDK. But, for the most part upgrading is a seamless process with one exception, Form Scripts.

What’s Changed

There were some major changes to the object model which will cause nearly all form scripts to break when upgrading from CRM 4.0 to CRM 2011.

Here are some examples on how the Form Scripts have changed

CRM 4.0 CRM 2011
crmForm.all.new_field; Xrm.Page.getAttribute(“new_field”);
crmForm.all.new_field.DataValue = 0; Xrm.Page.getAttribute(“new_field”).setValue(0);
var newField = crmForm.all.new_field.DataValue; var newField = Xrm.Page.getAttribute(“new_field”).getValue();
var newField = crmForm.all.new_field.DataValue; var newField = Xrm.Page.getAttribute(“new_field”).getValue();

For a full list of all of the new Xrm.Page Methods download the Microsoft Dynamics CRM 2011 JavaScript Development Cheat Sheet by Daniel Cai.

Converting Form Scripts from CRM 4.0 to CRM 2011

Luckily there is a conversion tool available which will convert your CRM 4.0 Form Scripts to the new format for CRM 2011. It will not fix 100% of scripts, so you will need to test each scripts. But it will take care of the bulk of the work for you. When you go through your scripts you may also find that some of them are obsolete now because of features added in CRM 2011. Like scripts for hiding fields based on a users security roles, which can now be handled through Field Level Security.

Download the JavaScript Converter

You can download the CRM 4 to CRM 2011 JavaScript Converter from CodePlex.

CRM Migration Assistant

If the JavaScript Converter wasn’t easy enough Mitch Milam offers a CRM Migration Assistant that will go through your entire organization, pull all of the form scripts and upgrade them. That way you don’t have to go through all of your forms and copy each of the scripts into the JavaScript converter.

You can purchase the CRM Migration Assistant from http://blogs.infinite-x.net/crm-add-ons/crm-migration-assistant/ . There is also a trial version which will let you try it out and convert just the Accounts and Contacts.

 

CRM Tool of the Week – Ribbon Workbench for Dynamics CRM 2011

If you have ever added a Custom Button to the CRM Ribbon by hand you probably wished that there was some tool that let you create the buttons through a UI. I have seen a couple Ribbon Editors, but the CRM Workbench from Develop1 is my favorite.

The CRM Ribbon Workbench takes all of the hassle out of editing the Ribbon.

Features

You can drag and drop buttons right where you want them on the tool bar.

 

Setting up Actions, Enable Rules and Display Rules are all a breeze with this tool. All of the available options are displayed to you. Just select the rule and then enter your values.

Setting up a Javascript Action for a Button

 

Setting up a Display Rule for a Button.

Unlike other tools the CRM workbench will automatically export, re-import and publish your solutions for you after making the modifications to the ISV.config. Editing the Ribbon can’t get much easier.

 

Download the CRM Ribbon WorkBench

You can download this free solution at:
http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx

 

CRM Tool of the Week – Phone Schedule Assistant for Microsoft Dynamics CRM 2011

One of the most common complaints when moving from CRM 4.0 to CRM 2011 is “Where did the Form Assistant go for creating follow up phone calls”?

Luckily Zero2ten has developed a solution that gives you the ability to easily create a follow-up call. This solution adds a section to the phone call form where you can specify information to create a follow-up phone call. When the new call is created it will also copy the notes from the previous call over for you. You can even use the phone call assistant to create reoccurring phone calls.

You can download this free solution at: http://www.zero2ten.com/Blog/tabid/63/EntryId/106/Phone-Schedule-Assistant-for-Microsoft-Dynamics-CRM-2011.aspx