Saturday, March 30, 2013

CRM2011 roll up 13 and the new SDK is released.

Microsoft released the  roll up 13 for CRM2011. The rollup 13 introduces the support for windows server 2012 and ADFS 2.1. The rollup also resolved the numbers of issues. For the complete list of hot fixes and updates read the following kb article.

http://support.microsoft.com/kb/2791312

Microsoft also released new SDK (version 1.0.15) to support roll up 13. Here is the download link.

http://www.microsoft.com/en-au/download/details.aspx?id=24004

If you have not work with SDK version 1.0.14 then a look at “EntityMetadata” spreadsheet. It lists the metadata about all the out of the box entities ( Entities, entity privileges, attributes, picklist values, relationships and global option sets).

Monday, March 18, 2013

Comparing JavaScript execution time in IE, Chrome and Firefox for CRM Polaris

Last year my team was trying to compare the execution time for REST and Soap (FetchXML and RetrieveMultiple) calls. We did not find any significant difference. Now after rollup 12, CRM supports multiple browsers. I have noticed that chrome seems to load CRM screens quicker than its counter parts.
So, I decided to compare the JavaScript (Rest, FetchXML and RetriveMultiple calls) execution time in Internet Explore, Chrome and Firefox.

Test UI

We have created a custom fields to run these tests. Here is the screen shot of those fields.
image
Here is how the results screen looks like.
image

Test Results

For this test, I set up the frequency to 10 as it may take a bit extra time for the first call. Every call retrieved 10 records. This test is carried out on  CRM Online organisation.

Internet Explorer 10- response time (in milliseconds)

image 

Chrome 25- response time (in milliseconds)

image

Mozilla Firefox 19- response time (in milliseconds)

image

Conclusion

All the execution time are less than sub 500 milliseconds with few exceptions. You can’t tell much difference.
Still REST calls the quickest in Internet Explorer. Overall Chrome is the quickest. You can tell Chrome loads the CRM UI quicker than its counter parts.
Results can vary based on server/client machine’s configuration and work load.
Thanks HP team for the coding.

Friday, March 15, 2013

How to switch between classic and new process flow forms in CRM Polaris

Polaris introduced new UI forms in CRM2011. These new forms come with “Process Flow” and classic form views. They look great but they have some functional limitations.
For example. You can switch from “Process Flow ” to classic view but you can’t switch it back. To get back to “Process Flow Form”, you need to close the form and open the record again. It is very annoying and does not provide a good user experience.
image
Here is the solution to the problem. We need
  1. HTML Web resource
  2. Form Id of the new form
  3. Add a Navigation Link on the form
In this blog I am going to deploy this solution on lead entity.

1. HTML Web resource

I have created a HTML web resource to switch from classic view to “Process Flow Form”. It have added the web resource to a unmanaged solution. You can download it from PolarisSalesForm_1_0.zip. Import the solution into your CRM deployment and publish the solution.

2. Form Id of the new form

We need the form Id of classic view of the form. Here are steps to retrieve the form Id of the lead entity.
  • Open the lead entity in customize mode. Open the form name “Lead” from the list of forms as shown in the following screen shot.
    image
  • Press F11 to get URL of the form. It will look like following screen.
    image
  • Copy the URL into a note pad or any text editor and look for formId. The highlighted part represents the guid of the formid.
    image 

3. Navigation Link on the form

  • Add a new navigation link to the lead form.
  • Add a name and icon file as shown in the screen shot
    image
  • Choose the External URL for the navigation link and refer the URL of HTML webresource we imported in step 1. Use the relative path of the html webresource as shown in the above screen shot.
  • The most important part of the URL is the parameter named data. we will pass formid retrieved in step 2 to this parameter.
  • The URL will look like the following URL.
    /WebResources/new_SalesForm?data=E3B6DDB7-8DF0-4410-AC7B-FD32E5053D38
  • Save the changes and publish the form.

Test The solution

  • Open a entity record.
  • Switch to classic view.
    image
  • The classis form will look like a following screen.
    image
  • Click on the “Sales Form” link on left navigation and it will take you to “Process Flow” form.
I hope this helps.



Sunday, February 17, 2013

Tool tip bug on lookup fields in CRM2011

In CRM2011 only the lookup fields have tool tips.  The tool tip generally displays “Click to select a value for fieldname” as shown in the following screen shot.

image 

The problem starts when you change the the the position of field label from side to top of the field. Before I talk about the bug, lets see “How to change the position of the labels from the side to top of the fields”. This setting is the property of “Section” Control of the entity form. Here are the steps to change the position of the labels.

  1. Double click on the section on the form.
  2. Click on the “Formatting” Tab.
  3. Scroll down and selects “Top” in the “Field Label Position” section as shown in the following screen shots.
    image 
  4. Save the changes and publish the entity. The changed section will look like the following screen shot.
     image

Bug Details

Now coming back to the tool tip behaviour. This behaviour changes based on the position of the lookup field in the section.

  1. If the lookup field is in the first column of the section. For example “Price List” field in the following screen shot. The tool tip will display “Click to select a value” without specifying the field.
    image
  2. If the lookup field is in the second column and there is any other field in the first column. For example “Territory” field in second column and “Price List” field in the first column in the following screen shot. The tool tip will display “Click to select a value for “field name in the first column”.
    image
  3. If the lookup field is in the second column and there is a optionset field in first column. For example “Currency” field in second column and “Payment Terms” field in the first column in the following screen shot. The tool tip will display “Click to select a value for “field name in the first column with all the drop down values”.
    image
  4. Similarly if the lookup field is second column and date time field in the first column then, the tooltip will behave the same way as step 3 displaying all the time slots as shown in the following screen shot.
    image


I don’t have solution to this problem. But you can minimise the impact by adding the lookups in the first column of the section.

Wednesday, January 30, 2013

CCOLA forms in Polaris(CRM2011)

Rollup 12 or Polaris is out for few weeks now. Microsoft have also release the server components for on-premise deployment today.I am playing with Polaris for few weeks now. There are a lot of new features introduced in Polaris and one of them is guided process flow forms or CCOLA forms. CCOLA forms stands for Contact, Case, Opportunity, Lead and Account  entities.These forms are available only in CRM Online at this stage.

These new forms guide the sales and customer service teams through the

  1. Sales Process (More Details)
  2. Case Resolution process (More Details)

The new forms comes with Process flow and classic form views. The following screen shots display the process flow form for lead entity.

image

image

The classic version of these forms are like original CRM forms. Some of the feature are available in both versions of the new forms. For e.g.  Bing map integration and Customer details control( Control displaying few fields customer record on case entity).

Good things about new process flow forms

  1. Guided process flow
  2. Inline editing – No more pop up windows
    image
  3. Bing map integration (for lead contact and account entity forms)
  4. Skype integration
  5. Auto Save
  6. Customer detail pane ( I really like this control. Now we can display the customer’s email and phone number on case entity)
    image

Limitations of new process flow forms

Call the following points the limitations or the scope for the improvements in future releases.

  1. Does not support java script
  2. Left Navigation functionality is limited. You can display the related records but you can’t add a new record. The only way to add new records to switch it to classic view or add the grid on the form.
    image
  3. New button will only allow you to create a new record of same type. For e.g New Button on lead entity will open up a new lead entity form.
  4. There is an option on the process flow form to switch to classic view but there is no option to switch back to process flow view.

Conclusion

This is a good start. I am hoping for a lot of improvements in near future. I would like to see the Bing map integration and customer detail pane as controls, so we can use them where ever we want in the system. Check the following link to learn about all the new features available in rollup 12.

http://rc.crm.dynamics.com/RC/2011/en-us/whatsnew.aspx?ver=5.1#BKMK_NewSales

Please leave the feed back and  add more good things or limitations to the list.

Sunday, January 13, 2013

White House’s official response to the building of death star petition.

This is my first blog that has nothing to do  with CRM. But it is very funny. Around 34435 people signed the petition to secure resources and funding, and begin construction of a Death Star by 2016. BC.  By law , White House has to respond to any petition signed by more than 25000 people. Here is the official response by White House.

https://petitions.whitehouse.gov/response/isnt-petition-response-youre-looking .

Generic solution to add missing associated views to the form navigation

This is the part 2 of my last blog Step by step tutorial to add the missing associated views to a CRM form. This blog will extend the solution to make it more generic. In the previous solution we have to add the relationship name in HTML web resource, which means  that we have to create multiple HTML web resources if we want to add multiple associated views in the system.
I have updated the solution to pass the relationship name as parameter(query string) to the HTML resource. This way we can use the same HTML web resource as many times as we want.

Here is the updated code for the HTML web resource.
 <html xmlns="http://www.w3.org/1999/xhtml" >  
 <head>  
   <title>Untitled Page</title>  
   <style type="text/css">html,body{font-family: Segoe UI, Tahoma, Arial;background-color: #d6e8ff;border: 0px; margin: 0px; padding: 0px;}</style>  
   <script type="text/javascript" language="javascript">  
       //debugger;  
       //get the context  
       var Xrm = window.parent.Xrm;  
       //get the current object id  
       var oId = Xrm.Page.data.entity.getId();  
       //get the object type  
       var oType = Xrm.Page.context.getQueryStringParameters().etc;  
       //set Relationship Name  
       var relName = getDataParam();  
       if (relName != "not found") {  
         //building a url  
         var sUrl = "/userdefined/areas.aspx?oId=" + oId + "&oType=" + oType + "&pagemode=iframe&security=852023&tabSet=" + relName;  
         //get relative path with orgname as required  
         var relativeUrl = Xrm.Page.context.prependOrgName(sUrl);  
         window.location = relativeUrl;  
       }  
       else {  
         noParams();  
       }  
       //Most of this code is from sdk dataparams example  
       function getDataParam() {    
       //Get the any query string parameters and load them into the vals array  
         var vals = new Array();  
         if (location.search != "") {  
           vals = location.search.substr(1).split("&");  
           for (var i in vals) {  
             vals[i] = vals[i].replace(/\+/g, " ").split("=");  
           }  
           //look for the parameter named 'data' and return relationship name  
           for (var i in vals) {  
             if (vals[i][0].toLowerCase() == "data") {  
               var relationship = decodeURIComponent(vals[i][1])  
               relationship = relationship.replace(/\+/g, " ")  
               return vals[i][1];  
             }//endif  
           } //end for loop  
           return "not found";  
         }//endif  
         else {  
           return "not found";  
         }  
       }// end function  
       function noParams() {  
         var message = document.createElement("p");  
         message.innerText = "No data parameter was passed to this page";  
         document.body.appendChild(message);  
       }  
   </script>  
 </head>  
 <body>  
 </body>  
 </html>  

How to call HTML web resource

  1. Add the navigation link to the form. The navigation link properties dialog will look like the following screen shot.

    image
  2. Choose the name for the navigation link.
  3. Select an icon for the link.
  4. Select  “External URL” instead of using the web resource. Use the relative path for the web resource and pass the relationship name as query string parameter as  shown in the screen shot above.
  5. Save and publish the changes and test the solution.
There you go now you can use the same HTML resource to add as many missing associated views as you want.