Archive for May 2012

CRM Tool of the Week – Global Search

Have you ever trouble finding a person in CRM, only to find that they were not showing up in your search results because they are a Lead and not a Contact?

I have used other CRM systems which let you search across multiple entities and have always felt that this was an important feature missing from CRM 2011. I am glad to see that Sonoma Partners has created a product that will add this feature to CRM. As you would expect from Sonoma Partners the product integrates nicely within CRM, adding a Global Search box to the Ribbon throughout CRM. The Search is also customizable so an administrator can control what Entitys are available for users to search against.

Check out this video on CRM 2011 Global Search to see it in action.

For more information on Global Search Contact Sonoma Partners.

CRM Tool of The Week – Solution Packager

R8 has many new exciting features like CRM Mobile and Cross-Browser Support. However, what I have been most anticipating since Convergence 2012 was not a feature from Rollup 8 but one of the tools that will be released in the updated SDK called the Solution Packager. 

What is the Solution Packager?

 The solution packager is a command line tool that lets you pack and unpack a solution zip file. The unpacking goes beyond just unzipping the file into the handful of files contained in a solution. It extracts components at a granular level creating a file for each form, view and web resource.

What is So Great About the Solution Packager?

The Solution Packager offers a new level of code management for Solutions.

Before it was very hard to effectively manage the code changes to your CRM Solutions. You may have been checking your solition files into SVN, so your solution files would be backed up and could easily rollback to previous versions. But it was pretty futile to try and do a diff on two versions of a solution file or try and merge two branches.

Now with the Solutions Packager we can break the big unmanagable solutions files into smaller chunks that are easier to swallow. After unpacking the solutions and comparing them it’s much easier to tell what has changed, so we know to merge them or throw them out.

Downloading the Solution Packager 

The Solution Packager is due to be released in an update to the SDK in the Spring/Summer of 2012. However, I was very happy when I downloaded the Rollup 8 Beta files and saw that one of them was for the Solution Packager.

The Rollup 8 Beta is available through the Connect Website. Take a look at Girish’s article on downloading the beta at http://blogs.msdn.com/b/girishr/archive/2012/05/09/microsoft-dynamics-crm-2011-ur9-a-k-a-r8-beta-is-here.aspx . Once you get to the Download screen you will see one of the files you can download is Dynamics CRM Solution Packager.

Using the Solution Packager

The Solution Packager is a command line tool. You will need open the command prompt by going to Start>Run>cmd . Then use the cd command to switch to the directory where you saved the SolutionPackager.exe file. You can then use the commands below to pack or unpack a solution.

Extract Command to unpack a solution

The following commands will Extract the solution zipfile c:\Solutions\Default_1_0.zip to the folder c:\Solutions\Default_1_0
Full Command
solutionpackager.exe /action:Extract /zipfile:c:\Solutions\Default_1_0.zip /folder:c:\solutions\Default_1_0
Shorthand Command
solutionpackager.exe /a:Extract /z:c:\Solutions\Default_1_0.zip /f:c:\solutions\Default_1_0

Pack Command to package a solution back up

The following commands will Package the contents from c:\Solutions\Default_1_0 back into a zipfile called solution zipfile c:\Solutions\Default_1_0.zip
Full Command
solutionpackager.exe /action:Pack /zipfile:c:\Solutions\Default_1_0.zip /folder:c:\solutions\Default_1_0
Shorthand command
solutionpackager.exe /a:Pack /z:c:\Solutions\Default_1_0.zip /f:c:\solutions\Default_1_0

Other Command Parameters

There are some additional Optional Parameters you can user including:

  • /packagetype {Unmanaged|Managed|Both}
  • /safe
  • /clobber
  • /errorlevel {Off|Error|Warining|Info|Verbose}
  • /log

A full list of the command line commands is available in the ReadMe document that is part of the download.

Creating a Dynamic IFrame

BingAccountForm

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.ui.controls.get("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

SiteMapEditor

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/

Using JQuery in CRM2011

With the addition of Cross Browser support in CRM 2011 Rollup 8 you will now need to consider your form scripts being loaded in browsers other than Internet Explorer. If you are not already using the JQuery library in CRM2011 you will seriously want to consider starting to use it, as it will assist you with keeping your Form Scripts working in the various browsers.

Download JQuery

You can download the latest verison of JQuery from http://jquery.com/.

Add the JQuery Library to CRM2011

After you have downloaded the JQuery you will want to add it to CRM as a JScript Web resource.

  1. Open your Solution or open the Default Solution by going to Settings > Custmoizations > Customize the System.
  2. Select Web Resources and Click New.
  3. Enter a name and Select Type: Script (JScript).  I recomend also entering the JQuery file name in the descript so you know what version is installed.
  4. Click Browse and Select the JQuery file you just downloaded.
  5. Save and Publish the new Web Resource.

You can now add the JQuery Library to your Forms so you can use it from your other Web Resources.

Learning JQuery

If you have not used JQuery before there are helpful tuturials at http://docs.jquery.com/Tutorials to help get you started.

 

hermes kelly hermes Outlet hermes Store hermes birkin chanel classic flap louisvuitton handbags louis vuitton outlet cheap Balenciaga cheap louis vuitton