Blogs


  • CRM 2011 Rollup Update 10 now available


    Microsoft released a new Rollup Update (10). It can be downloaded from

    http://www.microsoft.com/en-us/download/details.aspx?id=30711

    So, what happened with Rollup Update 9? Well, it was no Rollup Update 9 due to timelines issues and we now have just rollup 10.

    This update provides also:

    • Support with Microsoft Dynamics CRM 2011 and Microsoft Office 2013
    • Support with Microsoft Dynamics CRM 2011 and Windows 8
    • Support with Microsoft Dynamics CRM 2011 and Internet Explorer 10

    To see the details of the issues and bug fixes go to this link

    http://support.microsoft.com/default.aspx?kbid=2710577


    Continue reading...



  • Windows 8 and Visual Studio 2012 released for MSDN subscribers


    Today is a great and exiting day, just downloaded and installed windows 8 and Visual Studio 2012 and getting ready to start building Metro style applications.

    My first impression of windows 8 was awesome but it still looks weird with all the squares and light colors. It would just about to get accustom, I am still missing the Start button in the left bottom corner but having the taskbar propagated through my monitors is great. I found that unfortunately I cannot run any of the Metro style applications because I am running my machine with a Administrator user, it must have a time to stop using an administrator account and use a separate login with lower privileges to enjoy Metro!

    Visual Studio 2012 is great and have learn a lot this weekend on the new features specially on the TFS 2012 and the way the projects can be now managed through the new web interface.

    One weird and annoying thing are the top menues in upper case fortunaly there is a hidden key in the registry to torn those back to normal. So if you want to switch that back just follow these steps:

    1.    Launch Regedit and navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General
    2.    Create a DWORD value named SuppressUppercaseConversion with value 1.

    I Also played with the Code clone detection analysis tool and found it a must tool for any junior developer. For any CRM Developer or web service developer you will notice that you will get lot of clone coding inside the reference.cs files so it would be good to exclude those files if you really want this tool to look into your code only and skip the auto generated files for web services references. To do that you just need to add a new XML file and name it with an extension of .codeclonesettings then add content like this

    <?xml version="1.0" encoding="utf-8" ?>

    <CodeCloneSettings>

    <Exclusions>

    <File>Service References\*\Reference.cs</File>

    </Exclusions>

    </CodeCloneSettings>


    Continue reading...



  • Getting ready for the CRM 2011 news and updates


    Like most of you can find on the web, a great new release of Dynamics CRM 2011 is coming soon.

    The list of the new features can be found in the following link http://crm.dynamics.com/en-us/roadmap

    I wont to focus on the Cross Browser feature here, even though this new functionality will be very welcome for most of the users including us (the developers), most of us might get some big headaches if we don't be prepared to this change on time. Luckily Microsoft has released a few weeks ago a tool that will help us adpat the JavaScript codes that could be potential issues on the new release, especially with the other browsers like Chrome, Safari, etc.

    This tool is called Microsoft Dynamics CRM 2011 Custom Code Validation Tool and can be downloaded from http://www.microsoft.com/en-us/download/details.aspx?id=30151

    Once the solution is installed we will see the tool can be run from the solution itself:

    When executing the tool we will be able to see the functions and methods that we will have to pay attention to replace and fix to support the cross browser feature.

    The complete list of the incompatible functions between the different browsers that this tool detects can be found on this link

    http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx

    for those that want to start trying the new version on their On Premise environments I recommend following the detailed guidelines that Girish Raja published on this link

    http://blogs.msdn.com/b/girishr/archive/2012/05/09/microsoft-dynamics-crm-2011-ur9-a-k-a-r8-beta-is-here.aspx

    do not confuse the number of the rollup update 8, that is already available for download and released on May 2012 that can be downloaded from http://support.microsoft.com/kb/2600644 with the version of the Release 8 which is supposed to be called now the Rollup Update 9.

    Regards
    Damian Sinay


    Continue reading...



  • CRM 2011 ERD Designer


    I just released my first CodePlex project, the CRM 2011 ERD Designer!
    It can be downloaded from http://crm2011erd.codeplex.com/

    The CRM 2011 ERD Designer is a Silverlight 4 application that is packaged as a Managed CRM 2011 Solution. This tool allows you to build ERD (Entity relationship diagrams) that are dynamically updated based on the published CRM entities and Fields; you can create/edit/remove entities and fields from the ERD designer. The tool allows also printing the diagrams.

    Note This release is currently in Beta so please provide feedback in the discussion area for any areas of improvement.

    The tool has the following Features

    o    Add new entity
    o    Add new Field
    o    Relationship details
    o    Save from Entity ribbon
    o    Edit Entity
    o    Edit Field
    o    Edit Relationship
    o    Add entity to Diagram
    o    Remove entity from Diagram
    o    Remove field from Diagram
    o    Remove system fields from Diagram
    o    Delete Entity
    o    Delete Field

    Installation

    1. Download the CRM 2011 ERD Designer and import it into CRM 2011 On Premise or CRM Online.
    2. Refresh the browser.
    3. You can then access CRM 2011 ERD Designer within the Settings Area by selecting ERD Diagrams under the Extensions menu option.

    Note: As it is a managed solution it can be completely removed from CRM by selecting to delete the solution from the Solutions View in CRM.

    To make this project I used the following components

    o    Silver Diagram SDK
    o    MVVM Light Toolkit
    o    CRM Developer Toolkit
    o    Silverlight Control Toolkit
    o    Menu and Context Menu for Silverlight 4.0
    o    MEFedMVVM

    So if you download the source code and want to build the solution you will need to

    1) Download the Silver Diagram SDK from the SilverDiagram site (just copy the SD.XXXX DLL's).
    2) Download the CRM 2011 SDK from Microsoft site and install the Developer Toolkit that is inside the sdk\tools\developertoolkit folder
    3) Download the MVVM Light Toolkit from Codeplex site.
    4) Download the Menu and Context Menu for Silverlight 4.0 fromCodePlex site
    5) Download MEFedMVVM from CodePlex site

    Enjoy It!
    Damian Sinay


    Continue reading...



  • How to get the page and word count in Microsoft Word


    Note: be sure to reference the Microsoft.Office.Interop.Word.dll in your project first.
     

    To get the page and word count in Microsoft Word is very simple. First we need to instance the Application and the Document object to open the Word file:
     

    object objMissing = System.Reflection.Missing.Value;

    Microsoft.Office.Interop.Word.Application objWord = new Microsoft.Office.Interop.Word.Application();

    Microsoft.Office.Interop.Word.Document objDoc;

    objWord = new Microsoft.Office.Interop.Word.Application();

    object fileName = "Full path of the File";

    objDoc = objWord.Documents.Open(ref fileName,

    ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing,

    ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing,

    ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);

    objDoc.Activate();
     

    Then we need to use the WdStatistic class. In there we have an Enum which need to use only two in this case: wdStatisticPages and wdStatisticWords.

    To take the page count do the following:
     

    Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages;

    int totalPages = objDoc.ComputeStatistics(stat, ref objMissing);
     

    And to take the word count do the following:
     

    stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticWords;

    int totalWords = objDoc.ComputeStatistics(stat, ref objMissing);


    Enjoy it!


    Continue reading...



  • How to validate if an item is toggle in Report Service 2008


    Here we'll explain how to validate the toggle item. For example:

    We have an Account with three Products grouped in the report and added the option to toggle:

    When we toggle the Account, we have this result:

    Notice that the Product is showing in the group, so the report would be messy and confusing for billing calculations for example.

    The solution is simple, use the InScope function in the expression. Go to the textbox of the product and add the following expression:

    =Iif(InScope("Name of the row Group"),Fields!productnumber.Value,"")

    Here is the result:

    Enjoy it!


    Continue reading...



  • CRM 2011 Rollup Update 8 now available


    Microsoft released a new Rollup Update (8). It can be downloaded from

    http://www.microsoft.com/en-us/download/details.aspx?id=29692

    Unlike previous rollup updates where they included new features, this update only includes bug fixes. To know the list of all the issues resolved by this update follow this link.

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


    Continue reading...



  • Using encodeURIComponent when using ODATA queries in JavaScript and Dynamics CRM 2011


    This week I ran into an issue that took me a while to figure related to the ODATA queries in Dynamics CRM. This might be a common mistake for other CRM and ODATA REST developers so I wanted to share it here.

    Problem description

    Here was the most difficult thing; there was not error at all and neither any error message. The JavaScript code that was put on an entity form customization just didn't work as expected. It was not returning a record that we knew existed in the CRM system. The code looked similar to this

    var serverUrl = Xrm.Page.context.getServerUrl();

    var ODataPath = serverUrl + "/XRMServices/2011/OrganizationData.svc";

    var contactReq = new XMLHttpRequest();

    contactReq.open("Get", ODataPath + "/ContactSet?$filter=EMailAddress1 eq '" + email + "' and StatusCode/Value eq 1", false);

    contactReq.setRequestHeader("Accept", "application/json");

    contactReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");

    contactReq.onreadystatechange = function () {

            contactEmailReqCallBack(this, changes, a, guid);

    };

    contactReq.send();

    Basically this code requests a contact by looking at a specific email address that is passed to the parameter email. On my case the code was working for some emails and not for others, I realize the ones that were not working were like firstname+lastname@gmail.com for example. So the URL was formed as follows

    http://crm2011/org/XRMServices/2011/OrganizationData.svc/ContactSet?$filter=EMailAddress1 eq 'firstname+lastname@gmail.com' and StatusCode/Value eq 1

    it didn't return any record even though there was a contact in the CRM system with that email address. So, what was the problem here? The problem was the + sign is interpreted as space in the URI as well as other characters might be wrongly interpreted, like for example the / char.

    The solution

    Use the encodeURIComponent function to encode the email address properly in the URL. Our code changed now looks as follows:

    var serverUrl = Xrm.Page.context.getServerUrl();

    var ODataPath = serverUrl + "/XRMServices/2011/OrganizationData.svc";

    var contactReq = new XMLHttpRequest();

    contactReq.open("Get", ODataPath + "/ContactSet?$filter=EMailAddress1 eq '" + encodeURIComponent(email) + "' and StatusCode/Value eq 1", false);

    contactReq.setRequestHeader("Accept", "application/json");

    contactReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");

    contactReq.onreadystatechange = function () {

    contactEmailReqCallBack(this, changes, a, guid);

    };

    contactReq.send();

    Conclusion

    Never forget to use the encodeURIComponent function when passing parameters on your ODATA queries!

    I hope this helps others to ovoid a problem like the one descripted here.

    For all who like to work with ODATA services in Dynamics CRM here is a great tool that will help creating the queries. http://crm2011odatatool.codeplex.com/


    Continue reading...



  • New CRM 2011 SDK available for download


    Within the release of the rollup update 7 a new version of the Microsoft dynamics CRM 2011 SDK has been released on 3/22

    It can be downloaded from

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


    Continue reading...



  • CRM 2011 Rollup Update 7 now available


    Yesterday Microsoft released a new Rollup Update (7). It can be downloaded from

    http://www.microsoft.com/download/en/details.aspx?id=29221

    Microsoft continues adding new features to Dynamics CRM 2011 on each rollup update that is released, not only fixing bugs or issues.

    A new feature that is included on this rollup update is called Read Optimized Forms. This allows faster form loads that are intended to be used for read only purposes.

    More information can be read at http://msdn.microsoft.com/en-us/library/hh913610.aspx

    Notice that this new feature is disabled by default when you install the Rollup Update 7.

    To enable this feature go to Settings then to Administration and click on System Settings

    After enabling this feature everytime you open a record from a grid by double clicking the forms will open in read only mode as follows

    Noticed there is no ribbon controls on the top.

    If you have any JavaScript code that will run for the On Load event then the Form will open in Edit mode and won't use the read optimized mode. The feature will be disabled for that entity to prevent breaks on any previous customizations that might be already in place.

    You can see more information about this new feature at

    http://blogs.msdn.com/b/crm/archive/2012/03/22/read-optimized-forms.aspx


    Continue reading...