Archive for September, 2012

CRM application prompting credentials for all SOAP/OData calls

September 27, 2012 3 comments

Other day my CRM application started behaving weirdly, it was prompting credentials for every OData/SOAP calls in my Jscripts.

Here is the scenario, I had a custom jscript library on Account entity which enable/disable ribbon buttons on form load.

So when I open the Account form I had to provide credentials for all those service calls in my custom jscript.

I thought the problem was with my browser settings I even tried by resetting properties of my browser but it did not solve the issue

Finally setting to the Windows Authentication’s “Providers” solved my problem.

Below are the steps I followed

  • Open IIS
  • Click on “Microsoft Dynamics CRM” website
  • Double click on “Authentication” on “Features View”
CRM Windows Authentication

CRM Windows Authentication

  • Click on “Providers” on left navigation
  • Make sure “Negotiate” provider is the 2nd option after NTLM


  • Reset IIS

These steps worked in my case. Thanks for the hosks link

Things to be considered while using duplicate detection feature in CRM 2011

September 22, 2012 Leave a comment

In CRM you can create “Duplicate detection rules” to avoid duplicate records in to the system.

Below are the scenarios I observed with duplicate detection in CRM 2011

Enabling duplicate rule while creating/Updating records using CRM service

  • By default, when you execute a Create or Update request using the CRM Service, the record will be created/updated without checking for duplicates
  • We can force the platform to check for duplicates by setting the “SuppressDuplicateDetection optional parameter to “false”
  • You get “A record was not created or updated because a duplicate of the current record already exists.” exception it matching record already exists

CreateRequest req = new CreateRequest();

Account myAcc = new Account(){

Name = “Rajeev”,


req.Target = myAcc;

req.Parameters[“SuppressDuplicateDetection“] = false;




catch (FaultException<OrganizationServiceFault> ex){

if (ex.Detail.ErrorCode == -2147220685){

// duplicate detected: Handle it here






Enable/Disable duplicate detection rules while data import

Using “Duplicate Detection Settings” we can turn the duplicate detection rules on/off while data import. It’s a system level setting applicable to all imports

Duplicate Detection Settings

Duplicate Detection Settings

You can also use the “Allow Duplicates” option, right at the time of Import to turn off the duplicate detection rules

Duplicate Detection Data Import

Duplicate Detection Data Import

The “Allow Duplicates” option works based on the duplicate detection settings and duplicate detection rules defined.

If you choose

  • Yes
    • It wont fire the duplicate detection rules
  • No
    • It will fire the duplicate detection rules

Duplicate Detection Rules Automatically get Unpublished

  • By design, whenever any entity metadata is changed all duplicate rules associated with that entity are unpublished
  • Whenever you import a solution you release, if the solution has customization change for an entity, say for ‘Account’ entity then the duplicate detection rule for ‘Account’ would turn into unpublished state.
  • So whenever you imported a solution make sure your duplicate detection rules are in published state


NullReferenceException while opening CRM form

September 19, 2012 Leave a comment

I was getting an exception when I open a “Account” record.

When I verify the CRM server Event Viewer I got this below “NullReferenceException” warning message



After spending some time I came to know that the problem was because of customization change I did recently


  • I deleted and recreated a custom field with same schema name but with different data type
  • I had the new field added on my ‘Account’ form


I can’t say that it is a fix but below step worked for me

  • Removed the field from the Form
  • Publish the customization
  • Add the field back to the Form

Here is a useful article which helped me


Access denied error on closing of Appointment in CRM 2011

September 17, 2012 Leave a comment

Recently when I configured my CRM application with “https” binding, I was getting the “Access Denied” exception while closing the appointment activity

Access Denied

Access Denied on Closing Appointment

When I check the event viewer I had below “INVALID_WRPC_TOKEN” exception

Microsoft.Crm.CrmException: INVALID_WRPC_TOKEN: Validate WRPC Token: WRPCTokenState=Invalid

When I try to find the reason for the issue I came to know that it’s a known issue with CRM 2011 UR 6.

Workaround :-

  • We can disable the CRM token checks via Registry change
  • Here is my previous article which explains how to make the registry change

Here is post on MSCRM forum


Auditing User’s Access In CRM 2011

September 15, 2012 1 comment

One of the key feature in CRM 2011 which was not exist in CRM 4.0 is “Auditing”

CRM 2011 has Out Of the Box Audit feature to audit the business data.

With the CRM 2011 Roll Up 5, we can also audit the users logon access with the feature “Audit User Access”

“Audit User Access” feature logs below information

  • When the users logging on
  • Where the access is originated from
    • i.e., Notifies whether they access from CRM Web application, Outlook or SDK calls

Enabling “Audit User Access” feature

  • Go to “Settings –> Auditing  –> Global Audit Settings
  • You get “System Settings” form
  • Check “Audit User Access” checkbox
Auditing User Access

Auditing User Access

How to view the “Users Access” log

  • Go to “Settings –> Auditing  –> Audit Summary View
  • Click on “Enable/Disable Filters” to filter the audit summary
  • Choose “Event” column on the grid and check the desire events
Audit Summary View Filter

Audit Summary View Filter

A very useful link on Auditing Best Practices


Limitations of CRM

September 9, 2012 Leave a comment

Below are few limitations of CRM I came across with workaround

  • Excel Export
    • You can only export 10000 records.
    • If you export more than 10,000 records, only the first 10,000 records are exported
    • Can be modified by updating the Organization record and setting the maxrecordsforexporttoexcel field


    • Refer full properties of Organization entity here
  • Data Import
    • CRM 2011 Online: single file must be less than 8MB
    • We can zip many files to one .zip file. This file has to be less than 32MB
    • On upload of the zip file, CRM 2011 unzip it on server and process the files individually, If the size of any single file is greater than 8MB, upload will fail
  • Sub-Grid’s On The Form
    • The first 4 sub-grids can be populated with data in a form when it loads
    • If more than 4 sub-grids on a form, the remaining sub-grids require some user or form script action to retrieve data
    • This limitation has gone with UR 12 and Polaris, now we can now add as many sub-grids to our form as we like and all sub-grids will now be loaded automatically
  • OData End Point Limitation
    • Setting Party list – We can’t set more than more than 1 partylist with Odata end point. Refer more from my article
    • Limit is 50 records per query
    • Arithmetic, datetime and math operators are not supported
    • “Order by” clause is only allowed on the root entity
    • $format and $inlinecount operators are not supported
  • Query Result Set Limit
    • Default is 5,000 records
    • There is a workaround to this limit by making Registry setting (How to)
  • Duplicate Detection Rules
    • There can be a maximum of 5 published duplicate detection rules for a particular base record type
  • Miscellaneous
    • In CRM 2011 online, we can only create maximum of 200 custom entities and 200 custom workflows

Here is the link for more limitations


Getting Record Count In CRM 2011

September 7, 2012 Leave a comment

Assume you have more than 5000 Contacts in your CRM organization and you want to get the exact count from Advanced Find.

Out of the box, CRM 2011 displays record count on each view up to only 5000. If more than 5000 it will display (5000+)

Records Count - View
Records Count – View

To get the count with out using SDK, Below are the ways

  1. Export records to Excel by using the “Static worksheet with records from all pages in the current view” feature and see the max row number in Excel
  2. Report Wizard
    • You can create a very simple report using built-in CRM Report Wizard to display the record count
    • Refer useful article which has the process to build report


Categories: Uncategorized

Client Access Licenses (CAL) – CRM 2011

September 4, 2012 1 comment

CRM 2011 for On-premises is licensed using a Server/CAL (Client Access License) model.

  • There are two CALs with the following usage distinctions
    • User CAL – Enables each licensed user to access the CRM Server from any device.
    • Device CAL – This assigns the CAL to a device so it can be shared by non-concurrent users making this an ideal option for shift workers who share the same device or hot-desk staff in a call center.

License Vs CAL

  • CRM server license is required for each running instance of the software, and CALs are required for each person or device accessing a CRM Server

The functionality for an on-premise installation of Microsoft Dynamics CRM is controlled by 3 types of CAL

CAL CRM 2011

CAL CRM 2011

  1. Employee Self Service (ESS) CAL
    • ESS CAL is ideal for enabling CRM users to connect to CRM from external applications like SharePoint, web portals as well as custom applications.
    • Enable internal users to connect with CRM through an Application Programming Interface / GUI without using the standard CRM web or Outlook client interfaces.
  2. Limited CAL
    • Limited CAL users have privileges to manage work, assign and share their data with other users in the organization.
    • These users have access to powerful reporting capabilities of CRM
  3. CAL
    • CAL delivers the full read-write capabilities of CRM
    • CAL users have complete control over all the information stored with in a CRM system managed through the security roles.
    •  They also have ability to administer and customize CRM, create and update business reports, and business processes

Refer below useful links


Categories: CRM, CRM 2011 Tags: , , ,