The below code is SOAP call from JavaScript for retrieving user setting for country code:

POST https://orgname.crm4.dynamics.com/XRMServices/2011/Organization.svc/web
Content-Type: text/xml; charset=utf-8
SOAPAction: http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/RetrieveMultiple

<s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>
    <RetrieveMultiple xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts/Services” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
      <query i:type=”a:QueryExpression” xmlns:a=”http://schemas.microsoft.com/xrm/2011/Contracts”>
          <a:Columns xmlns:b=”http://schemas.microsoft.com/2003/10/Serialization/Arrays”>
              <a:Values xmlns:b=”http://schemas.microsoft.com/2003/10/Serialization/Arrays”>
                <b:anyType i:type=”c:guid” xmlns:c=”http://schemas.microsoft.com/2003/10/Serialization/”>ce4c5141-9941-456b-9007-fbc3c5f02e8e</b:anyType>
              <a:EntityName i:nil=”true” />
          <a:Filters />
        <a:LinkEntities />
        <a:Orders />
          <a:PagingCookie i:nil=”true” />
OutPut In JavaScript
var xml = “” +
“<s:Envelope xmlns:s=\”http://schemas.xmlsoap.org/soap/envelope/\”><s:Body><RetrieveMultiple xmlns=\”http://schemas.microsoft.com/xrm/2011/Contracts/Services\” xmlns:i=\”http://www.w3.org/2001/XMLSchema-instance\”><query i:type=\”a:QueryExpression\” xmlns:a=\”http://schemas.microsoft.com/xrm/2011/Contracts\”><a:ColumnSet><a:AllColumns>false</a:AllColumns><a:Columns xmlns:b=\”http://schemas.microsoft.com/2003/10/Serialization/Arrays\”><b:string>defaultcountrycode</b:string></a:Columns></a:ColumnSet><a:Criteria><a:Conditions><a:ConditionExpression><a:AttributeName>systemuserid</a:AttributeName><a:Operator>Equal</a:Operator><a:Values xmlns:b=\”http://schemas.microsoft.com/2003/10/Serialization/Arrays\”><b:anyType i:type=\”c:guid\” xmlns:c=\”http://schemas.microsoft.com/2003/10/Serialization/\”>ce4c5141-9941-456b-9007-fbc3c5f02e8e</b:anyType></a:Values><a:EntityName i:nil=\”true\”/></a:ConditionExpression></a:Conditions><a:FilterOperator>And</a:FilterOperator><a:Filters/></a:Criteria><a:Distinct>false</a:Distinct><a:EntityName>usersettings</a:EntityName><a:LinkEntities/><a:Orders/><a:PageInfo><a:Count>0</a:Count><a:PageNumber>0</a:PageNumber><a:PagingCookie i:nil=\”true\”/><a:ReturnTotalRecordCount>false</a:ReturnTotalRecordCount></a:PageInfo><a:NoLock>false</a:NoLock></query></RetrieveMultiple></s:Body></s:Envelope>” +

var xmlHttpRequest = new XMLHttpRequest();

xmlHttpRequest.open(“POST”, Xrm.Page.context.getClientUrl() +”/XRMServices/2011/Organization.svc/web”, false);
xmlHttpRequest.setRequestHeader(“Content-Type”, “text/xml; charset=utf-8”);
xmlHttpRequest.setRequestHeader(“Accept”, “application/xml, text/xml, */*”);
xmlHttpRequest.setRequestHeader(“Content-Length”, xml.length);

var resultXml = xmlHttpRequest.responseText;



Hope it helps!

Show Error Dialog in Microsoft Dynamics CRM style using Xrm.Internal.openErrorDialog

Unsupported still a good one to know

Debajit's Dynamic CRM Blog

By this time many of you might have already explored the Xrm.Internal namespace and displayed your custom webresources in CRM 2013/ 2015 modal style. Well, if you have not, I suggest you check my blog post https://debajitcrm.wordpress.com/2014/04/29/exploring-the-xrm-internal-namespace-in-crm-2013/ to explore the Xrm.Internal namespace and i bet you would like it.

Coming back to the topic, if we open our custom webresources in CRM modal style, why not show the custom client side errors in CRM 2013 style? If you are thinking how to to do this, you have to come back to Xrm.Internal namespace and explore its Xrm.Internal.openErrorDialog method.

First let us explore the Xrm.Internal.openErrorDialog method. The following is the nomenclature of this method.

So we can see that it accepts three parameters

  • Error Code
  • Message
  • Serialized Exception

Error Code : If you see the nomenclature, it appends “0x” to the error code. It should be a number. If you enter…

View original post 113 more words

Cortana voice commands for Microsoft Dynamics CRM 2015 for phones

Another great feature with CRM 2015 is ability to speak with your Microsoft Dynamics CRM for phones commands if you are using Cortana on Windows 8.1 phones.

Watch this quick video for an overview about using Cortana voice commands on Windows 8.1 phones:

clip_image001 Microsoft Dynamics CRM 2015 Cortana Demonstration (2:00)

You can use the following CRM voice commands with Cortana. Cortana voice commands for CRM are only available in English at this time.

To do this in CRM

Say this

Open an item

CRM open <item> called <item name>.


“CRM open account called Contoso.”


“CRM open account named Contoso.”

Show a view

CRM show <view name>.


“CRM show my active accounts.”


“CRM show me my active accounts.”

Search for an item

CRM find <item> called <name>.


“CRM find account called Contoso.”


“CRM find account named Contoso.”

Create a new item

CRM create <item type> called <item name>.


“CRM create contact called Maria Campbell.”


“CRM add new contact named Maria Campbell.”

Create a phone call activity

CRM remind me to call <call name>.


“CRM remind me to call Maria Campbell to set up appointment.”

Create an appointment

CRM schedule meeting to <subject>.


“CRM schedule meeting to discuss quote with Maria Campbell.”

Create a task

CRM remind me to <task name>.


“CRM remind me to email Maria Campbell.”


“CRM follow up Maria Campbell.”

“CRM follow up with Maria Campbell.”

“CRM follow up on Contoso.”

Open task list

CRM what should I do next?


“CRM what should I do next?”


The create commands work only with Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update. The other commands work with Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online as well as Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update.

Source: Click here

Hope it helps!


Thanks for everyone who follows my blog and finds it useful.

Just trying to add few small bits missing to my blog arsenal, this blog now officially has a twitter handle. I will be putting more social links

for this blog, to make it easier to find updates.



Here it is : @msdynamicsblog on twitter should help you see me there. I also embedded a link on the side to follow my work on twitter.

Hope it helps!

CRM 2013: How to remove Business Process Flow

This is a good work-around to remove business process flows if you do not want them

Microsoft Dynamics 365 CRM Blog

Microsoft Dynamics CRM 2013 comes out of the box with three system created Business Process Flows, one for Case, Lead and Opportunity. They are activated and ready for use.


All existing CRM Cases, Leads, and Opportunities are defaulted to these new CRM 2013 Business Process Flows. Here is an example for a Lead:


I very much like Business Process Flow – however there are some CRM projects that just don’t need them yet and would be better off – have them disabled. So what is the best option to turn them off?

Here is a good approach:

Make a copy of the existing Business Process Flows. CRM Client > Settings > Processes > open the Business Process Flow (i.e. “Lead to Opportunity Sales Process”) > click on the “Save As” button to make a copy of it for re-use in the future.


Now you can “Deactivate” the Business Process…

View original post 46 more words

{ADVANCED CRM KNOW-HOW} Know Table sizes within your CRM DATABASE

Recently in my project, as part of maintenance and data clean up activity, we needed to know the relative sizes occupied by various tables in CRM database. This was to prioritize clean-up based on table sizes.

Since this was CRM on premise we could quickly fire a query to check this:





— DB size.

EXEC sp_spaceused


— Table row counts and sizes.



    [name] NVARCHAR(128),

    [rows] CHAR(11),

    reserved VARCHAR(18),

    data VARCHAR(18),

    index_size VARCHAR(18),

    unused VARCHAR(18)



INSERT #t EXEC sp_msForEachTable ‘EXEC sp_spaceused ”?”’



FROM   #t


— # of rows.

SELECT SUM(CAST([rows] AS int)) AS [rows]

FROM   #t



This query uses a stored procedure provided by Microsoft to check space and runs it through all the tables in database.

The output is similar to below which can be saved to csv and then filtered to see which tables are using the most space:


It gives a quick indication on the number of rows, reserved space and unused one.

Hope it helps!


Everybody is aware of Parature bringing in lot of enhancements for Dynamics CRM product bundle. Official integration directly into CRM is still awaited. I did my own research to find a list of what Parature bring under Dynamics CRM product bundle:

The Parature Portal gives customers the support and data centre they need on their schedules. This tool integrates to the organization’s existing website and gives users gold-standard web-based support flexibility.

Multi-channel Care

Customers are more connected and better informed than ever before. Organizations are looking for business solutions that can strengthen their ability to connect with customers on their own terms, using whatever device and whatever channel they prefer. Parature offers one of the best cloud-based solutions for customer self-service.

Parature Portal: a 24/7 customer support center that is seamlessly integrated into your organization’s current website. This web-based help center gives your customers easy and convenient access to an intuitive, searchable knowledge base which delivers quick answers to their most-commonly asked service and support questions. If your customers still require personal support after using the knowledge base, they can submit a help ticket, track its progress at their convenience and receive an automatic notification email when an answer is available for them.


Parature Mobile Self-Service: Allow your customers to access answers to frequently asked questions using whatever device they prefer. The responsive design of Parature Portal enables you to increase the reach of your knowledge management efforts and provide consistent and personalized experiences across desktop and mobile devices.


Parature Facebook Portal: provide businesses and organizations with a 24/7 multi-service channel for customer support on Facebook. Customers and consumers can browse FAQs and updates, or submit a help desk tickets. In addition, you can integrate Parature Live Chat seamlessly to deflect customer complaints and service issue posts on your brand’s Facebook page.


Parature Real-time Chat: provide your customers with instant and personalized online support with Parature Chat. Empowers your organization with an immediate, seamless transition from a self-service to assisted channel at critical times during the support interaction. Comprehensive rules for escalation, deflection and prioritization ensure a timely response and that Service Level Agreements (SLAs) are met.



Knowledge Management

Parature Knowledgebase: an intuitive customer self-service solution that provides quick answers to common questions and support issues, plus essential downloads including forms, how-to videos, product manuals, knowledge base information updates and more. Easily add and update information and customize its order and placement to put the most-viewed information in a prominent place.


Source: http://download.microsoft.com/download/F/9/4/F94956A7-0EA0-4431-8A04-20D5D8D2769A/Release_Preview_Guide_April_2014.pdf

Hope it helps!