Monday, March 5, 2012

Is Something Missing in Your Organization Service? Check the Cache!

Today I am reposting my blog post from the Sonoma Partners blog.  Enjoy!

The Developer Extensions for Microsoft Dynamics CRM are extremely helpful tools for developing custom code for CRM.  They provide a simplified way to connect to the CRM Services with the ability to be configured and extended.

One ‘gotcha’ when using the CrmConfigurationManager class to connect to CRM is that the default configuration includes caching of the organization service.  A colleague of mine was running into an issue where the organization service wasn’t recognizing his newly created relationship when developing a query, so he had the need to disable caching.   

To do this, the App.config can be updated with the following XML:
2-22-2012 3-42-02 PM

Note that this requires the microsoft.xrm.client section to be declared in the App.config as well.  The full App.config should look something like this:
2-22-2012 3-44-52 PM
 
The examples above are covered in the following MSDN article http://msdn.microsoft.com/en-us/library/gg695805.aspx

5 comments:

  1. Hey thanks for informing....This for really helpful for me. 
    CRM Development

    ReplyDelete
  2. Thank you sharing this information thank you.Come back again for more interesting stuffs like one you got earlier! Bulk SMS in India

    ReplyDelete
  3. Thanks so much for this helpful information come back again for more interesting information…Keep it up
    Builders in Agra

    ReplyDelete
  4. Nice blog! Very interesting and informative post….Thank's for sharing such a nice information….Keep it up!!! Website Designing in Agra

    ReplyDelete
  5. Hey nice blog,Thank's for this helpful information come back again for more interesting information…Keep it up!
    Taxi in Agra

    ReplyDelete