Friday, 30 May 2014

CRM 2011/ CRM 2013 Connect to CRM Using Outlook Without Joining The Domain

When you try to configure connection to CRM onPremise using Outlook, you can encounter this error.


"There is a problem communication with the Microsoft Dynamics CRM server. The server might be unavailable. Try again later If the problem persists, contact your system administrator" when you want to connect to CRM using CRM for Outlook Client.



It will never ask you and show you prompt to input your credential, unlike the website which will prompt you a credential box. And it is required to you to join Domain.

Basically there are 2 requirements (see number 1 and 2) that are required and recommended
(for onPremise):

1. You implemented IFD in your onpremise

2. You didn't implement IFD it's okay, but you need to login to PC that run CRM for Outlook with the user that join domain not your own user, so let's say your username: mylovelycrm/aileen.gusni

Then your PC user name to login should use this joined domain account, not your private user, for example, aileen-pc.

It will cause the error because you are not using the expected username when you use the CRM for Outlook

But, without join domain you actually can connect using Outlook.
I was thinking that let’ say we are outside from the Domain connection, then go outside without internet, why we are still can connect using the Domain\username username credential?

It is actually store your credential in the Windows Credential as well.

So, to make it works, add your URL to the Windows Credential Manager.


And here is the result :


This worked for many occassions, if you did not have both requirements, your CRM server didn't implement IFD and your Windows PC User is private user not the joined domain account (didn't meet the minimum requirements)

But, this is also based on the Network Security applied to your Organization.


Of course, you are also required to ensure that the server address URL you type-in is correct and check your Deployment Manager.

Make sure the correct Binding Type (HTTP/HTTPS), server name or using IP, and Port.

Hope it helps!

CRM 2011/ CRM 2013 Customize Connection Role Custom View

In CRM 2011 or CRM 2013, there is a feature called as Connection Role.

When you go to the Connection Role Lookup, there is a custom view : Applicable Connection Roles.
Now, if I go to the Connection Role entity, I cannot create a new View :


So, what I can do is create a new view in Advanced Find


Now, I want to customize the System View based my Custom View, I want to customize the Columns Layout

Before :

1. First, create a custom view (using Advance Find)
Add new Columns :

2. Use this tool
XrmToolBox - View Layout Replicator

Use your view as source

And here is the result :

New fields/columns you defined before has been added.

Hope it helps!

Wednesday, 28 May 2014

CRM 2011/ CRM 2013 Error: Configuration system failed to initialize

When you try to make your custom console connect to CRM, you can have this error :

“Configuration system failed to initialize”



Put the StartUp node elements after the ConfigSection

 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>


So, your config setting will be :


Hope it helps!

CRM 2011/ CRM 2013 Error : A configuration element with the name 'Xrm' under the 'contexts' collection does not exist.

When you follow this :

This will give you error :
“A configuration element with the name 'Xrm' under the 'contexts' collection does not exist.”
Then, luckily, I try then find this link


The following shows part of the default configuration file that you should set:

  <section name="microsoft.xrm.client" type="Microsoft.Xrm.Client.Configuration.CrmSection, Microsoft.Xrm.Client"/>

  <add name="Xrm" connectionString="Url="/>
   <add name="Xrm" type="Xrm.XrmServiceContext, Xrm"/>


Hope it helps!

Tuesday, 27 May 2014

CRM 2011/ CRM 2013 oData Error When Passing Dynamic Date as Parameter : Unrecognized 'Edm.DateTime' literal 'datetime'2014-05-12T04:5:28Z'' in '75'

In this link, there is a guide to pass the date parameter to oData method.

Then this is the function

function getODataUTCDateFilter(date) {

 var monthString;
 var rawMonth = (date.getUTCMonth()+1).toString();
 if (rawMonth.length == 1) {
  monthString = "0" + rawMonth;
 { monthString = rawMonth; }

 var dateString;
 var rawDate = date.getUTCDate().toString();
 if (rawDate.length == 1) {
  dateString = "0" + rawDate;
 { dateString = rawDate; }

 var DateFilter = "datetime\'";
 DateFilter += date.getUTCFullYear() + "-";
 DateFilter += monthString + "-";
 DateFilter += dateString;
 DateFilter += "T" + date.getUTCHours() + ":";
 DateFilter += date.getUTCMinutes() + ":";
 DateFilter += date.getUTCSeconds() + ":";
 DateFilter += date.getUTCMilliseconds();
 DateFilter += "Z\'";
 return DateFilter;

Sometimes it works, but sometimes it does not. It depends on the time you send.
Like in my experience, I face this error :

“Unrecognized 'Edm.DateTime' literal 'datetime'2014-05-12T04:5:28Z'' in '75'”If I pass the millisecond as well, it also show error :

Because actually, after I try to access the URL that I build, yes, it result the error.


Here is my URL :


Then, I try to another time, it is actually works, then I found out, actually it works if the hours is more than 1 character, for example : ‘2014-05-12T04:55:28Z’

Actually, CRM only accept this format :

CRM cannot accept this format :

So, you have to have H, m, and s in two characters format.
And you also do not need to pass until millisecond, it will not work!

If it is 10:8:8, then have to change to 10:08:08
In my case, I have to convert to ‘2014-05-12T04:05:28Z’’2014-05-12T04:55:28Z’’2014-05-12T04:5:28Z’’

Let me try the URL


And it works


Resolution :

Change your getODataUTCDateFilter() function to :

function getODataUTCDateFilter(date) {
    var monthString;
    var rawMonth = (date.getUTCMonth() + 1).toString();
    if (rawMonth.length == 1) {
        monthString = "0" + rawMonth;
    else { monthString = rawMonth; }

    var dateString;
    var rawDate = date.getUTCDate().toString();
    if (rawDate.length == 1) {
        dateString = "0" + rawDate;
    else { dateString = rawDate; }

    var hourString = date.getUTCHours().toString();
    if (hourString.length == 1)
        hourString = "0" + hourString;

    var minuteString = date.getUTCMinutes().toString();
    if (minuteString.length == 1)
        minuteString = "0" + minuteString;

    var secondString = date.getUTCSeconds().toString();
    if (secondString.length == 1)
        secondString = "0" + secondString;

    var DateFilter = "datetime'";
    DateFilter += date.getUTCFullYear() + "-";
    DateFilter += monthString + "-";
    DateFilter += dateString;
    DateFilter += "T" + hourString + ":";
    DateFilter += minuteString + ":";
    DateFilter += secondString + "Z'";
    return DateFilter;

Hope it helps!

CRM 2011/ CRM 2013 OData Datetime Passing Parameter

To pass the date as parameter in oData filter, you can use this format:
filter=tfp_EffectiveFrom le datetime'2014-05-12T04:05:28Z'

To pass the date as parameter to filter using oData to get the data in between certain Date, for example : StartDate= < dateParam <= EndDate

You can use this :

filter=tfp_EffectiveFrom le datetime'2014-05-12T04:05:28Z'
and tfp_EffectiveTo ge datetime'2014-05-12T04:05:28Z'

Which is '2014-05-12T04:05:28Z' is the Dynamics Parameter

Please refer to this link :

Sunday, 25 May 2014

CRM 2011/ CRM 2013 Error when Quote Close As Won Message : The entity cannot be closed because it is not in the correct state

If you use custom code or workflow or dialog to Close Quote As Won, you might be facing this problem:


Cause :

Because your Quote status is currently Draft or Already Won.


To solve this :

Make sure that your Quote is already Activated, because it is the valid status before you close the Quote as Won.

Otherwise, you will face this issue, don’t forget to check your Quote Status.

Friday, 23 May 2014

CRM 2011/2013 The Power of Description

When you create a New Field, often, we just put the name of the field, that’s all and does not care the others, since it is not mandatory as well.

Sometimes Description is important, don’t underestimate its function, and don’t just let it blank. It can save your life later, I am seriously saying like that Smile

Okay, let’s go to a custom field in Account as example.

Let’s say I create a custom field to link Account with Country, I replace the text field standard field Address 1: Country to this field, then put in the Form to get the field in the Template.

First, we download the Import Template for Account, then get this one :


Well, we can see the tooltip description, actually it gives nothing, but just a common information, who care about this.

Then, you give a proper description on this field.


Then, save this.

There are 7 advantages so far I can tell because of this field.

1. I create a custom field, then I give information about this, so that my project mate also can see this field and its information, “what is my purpose”, and “what is its usage”.

Then, later, next 2 years, maybe customer wants to upgrade the version of CRM, then I might be forgot already why I should create this field?

2. When you want to see the detail of the field in the Form.


3. In the Form, I can help user to know what the field is.

In CRM 2013, we can have a tooltip, if in CRM 2011, the tooltip is the from the Label Name only.


4. In the Data Template


It gives you clearer Information, not just only say, it is “Unique identifier…”

5. In the time of making Processes


6. It saves your time to create a Documentation.

You are as Consultant then want to create a Functional Design Document, you can use tool to generate the Metadata.


And you can get the result, s not only showing the standard information for the Description field.


Well, if number 1-5, they will help Functional Consultant and Users, now let’s help your Technical Consultant or the one who Develop the custom code.

7. To make it enable in the Early Bound Class


Yes, it is very helpful if your field is not easy to be guessed, such as hidden or special field for flag, so better way is by giving the field a proper detail description.

Do you find another advantage for number 8? Then, comment and tell us!

Thanks and hope it helps!

CRM 2013 : Integrating CRM Web with Google Analytics

Actually, we can integrate CRM with Google Analytics to analyze the Visitors.

I was thinking this when I try to analyze a blog. Then, I try to use my crm Demo Online as the tracked website.
To create an account, Go to this :

Then I create, then get the script code.


Then I create a Web Resource to store this script


Then Show to one of the Form, or any page you want, or maybe you create your Landing Page or can be Dashboard.

This is my GA was installed


Then, give them some times to refresh the tracking result.
And here you go, you can see the visitor++




Hope it helps!

Connect to CRM 2013 OnPremise as OData Feed Service Excel Power Query Without Windows Credential (Join Domain)

In My Previous Post, I was talking about Power Query for generating the CRM Data. The data source can be various, from SQL Server, Online Search, Public Data, Web, OData, etc.

Now, I am talking about connect to CRM Data using OData Feed Request.

Here, are some good blogs explaining about connect to CRM Data, either Online or OnPremise, good for reference and inspiration.


Using CRM Online and Office 365 Authentication


Using CRM OnPremise and Windows Authentication.

If you have OnPremise Data, you also can access using SQL Server Authentication, it is easier.

But, right now, I want to access to CRM Data (OnPremise), that I cannot access to the SQL Database, and now my Windows Credential is not supported, since my PC is not joining Domain. I also don’t have the Office 365 Authentication.

Then, I try to access my CRM OData Feed :


Then, I click OK, it will prompt and challenge you for inputting correct Credential as I expected, since I don’t have default Credential for accessing this link.


Then, try to input the Credential

1. Using Anonymous


Result : The user was not authorized

2. Using Windows


Result : The user was not authorized

3. Try using Basic, also cannot.


Result : The user was not authorized

4. Using Web API


Result : I don’t know what value to be inputted as Key, so cannot be authorized.

5. Using Marketplace key


Result : I don’t know what value to be inputted as Key, so cannot be authorized.

6, Using Organizational account


Result : since this is not CRM Online and not support the Office 365 Authentication, so cannot be authorized.

I was thinking about this, it should be Basic can afford this one, but in this case, I cannot use the Basic Authentication, I don’t know why.

Then, I suddenly found a workaround by remembering some old-fashioned way, there is to use the Windows Credential Manager.

To fix this :
1. Go to Windows Credential Manager
It is located at: “Control Panel\All Control Panel Items\Credential Manager”
Or you can just type it in the Search Box of Windows.

2. Then Add a Windows Credential


3. Type in the Information you usually input to access your CRM through Browser.

Entry your Server URL (without port), let’s say you want to access :


Just type the mycrmserver or


4. OK and Save, here is the summary.


Back to Your excel, and try connect using Windows Credential, and it will work.


You also can filter the Query using URL:

Hope it helps!

Using Excel Power Query Online Search to Get Tons of CRM Data

I was attending a SQL Server 2014 Launching in Malaysia. Most of them were talking about PowerBI and SQL on the Cloud. Then, one of the best feature I can realize is the capability of Power Query to Query using external data source from Online Search.

It means that Power Query has capability to extract Public Data into directly to the Worksheet Table, without letting the user open the browser, then getting the data, copy one by one to the Excel table records. Wikipedia is one of the greatest source, they provide us the raw data.

Then, I was thinking to utilize this capability to get many data to our CRM demo purpose or Live purpose. When I had a presales activity and demo, what I did at the time is getting the raw data from Google then transform it into the Excel Table. Well, it is not efficient, since the data format from that Web is not in Excel or .CSV, so that I had to copy the data one by one to build a Excel Dataset to be converted as .csv file to be imported to CRM Database. Preparing data for demo sometimes is requiring more effort than developing it Smile

Okay, then luckily, I found this method and I will explain to you.

So, my requirements are:
1. Get the Country List around the world, together with the ISO Code as Country Code
2. Get the State or Province List of Indonesia

What you and I need are:Excel 2013 or older version with Power Query.

You can download the Power Query add-on from this URL :

And here is the prerequisite for Power Query

System Requirements

Supported Operating Systems:
Windows 7, Windows 8, Windows Server 2008 R2, Windows Server 2012, Windows Vista
    • Windows Vista (requires .NET 3.5 SP1)
    • Windows Server 2008 (requires .NET 3.5 SP1)
    • Windows 7
    • Windows 8
    • Windows 8.1

    The following Office versions are supported:
    • Microsoft Office 2010 Professional Plus with Software Assurance
    • Microsoft Office 2013 Professional Plus, Office 365 ProPlus or Excel 2013 Standalone

    Microsoft Power Query for Excel requires Internet Explorer 9 or greater.
    Microsoft Power Query for Excel is available for 32-bit (x86) and 64-bit (x64) platforms, your selection must match architecture of the installed version of Office
Then here is the link about Power Query :

Then, here is the Magic.

1. First, go to Excel
2. Go to Power Query and Search Online
3. Type what I want to search and get the result

4. Double Click and I get the Data
I can manage the Column as well to adjust my CRM Fields
5. Then I do the same thing for my next requirement.
Let’s say you have multiple data source, then you can use Merge as well

If I don’t use this feature, I have to go to the Public Data, for example Wikipedia to get the data and then copy paste to our Excel file.


And beside that, I also can go to specific web URL and specific Database as source as well, based on the Authentication, of course, since some of them are not public data.

From Web :



From OData
To get the Product Sample



From Database

By using this guy’s help, I can generate many data to my CRM without compiling, copying, and pasting the data from Public Data to Excel Smile It gives me a very good shortcut.

Hope it helps!