Category Archives: MS CRM 4.0

Removing Stored Credentials for Microsoft Dynamics CRM SDK Samples

If you want to remove credentials stored in configuration file for Microsoft Dynamics CRM SDK sample then this post is going to help you to implement that.

Requirement: Remove stored credentials from configuration file.

Solution: When you will try to run Microsoft Dynamics CRM SDK sample code first time it will ask you for credentials details like below (we are doing demo with Microsoft Dynamics CRM 2015 Online)


Once connected, it will store your credentials details in Credentials.xml file and next time when you will try to run sample again it will show you option to select existing configuration to connect to your CRM server.


We can add maximum 9 configuration, and if you want to remove any stored credentials details, you can go to C:\Users\<username>\AppData\Roaming\CrmServer\Credentials.xml location and can open credentials.xml file in any text editor. We can remove particular configuration or can delete all configuration based on requirement. Save your changes and now next time when you will try to run application it won’t show your that configuration details.


HIMBAP | Need any help in Microsoft CRM 2015 Development Contact US !!

Leave a comment

Filed under CRM Dvelopment Series

Calling Java Script on click of command button MS CRM 2015 – Step by Step

In this blog we will provide step by step process to call your java script function from command button. We are using RibbonWorkbench editor to create command button. You can download RibbonWorkbench tool from here and import it your crm organization by navigating Settings->Solutions->Import. Let’s first add our demo java script function, use following steps:

  • Create a solution by navigating Settings->Solutions->New and using following settings
    • Name: Demo
    • Publisher: Select default publisher of your organization
    • Version: provide version number for example 1.0
    • Click Save
  • Select Web Resources from left components tree and click on New
  • Fill name and display name for your web resource and select Script (Jscript) under Type drop down
  • Click on Text Editor button and add hello function like below

function Hello() {   alert(“This is custom button”); }

  • Click on Ok button and Save and Publish your web resource

Let’s say we want to add custom command button on account form, so let’s add account entity to our solution, follow below steps to add account entity to your solution

  • Select Entities and click on Add Existing button
  • Select Account entity from list and click on Ok
  • Select “No, do not include Required Components” under Missing Required Components dialog and click Ok

Now we need to open RibbonWorkBench tool to use our custom solution. Follow below steps

  • Open RibbonWorkBench solution and select our Demo solution
  • Drag a button and leave it next to Save button under Form section like below
  • DragbuttonExpend button under Solution Elements and setup properties from right hand section like below
  • setpropertyRight click on Commands tree and select Add New
  • Click on Actions lookup and click on Add button
  • Select Javasript Funciton Action and click on Ok
  • Use our Hello function and select our javascript web resource under library lookup and click on OK
  • Select our button again and associate command it with it like below


  • Click on Publish button to publish all the changes.
  • Create new account record or open existing account, you should get your custom button and on click on this button we should get alert


HIMBAP | Need any help in Microsoft CRM 2015 Contact US !!


Filed under CRM Dvelopment Series

Creating RSS Feed Dashboard in Microsoft Dynamics CRM 2013: Part 3

This is our last post to create a RSS feed dashboard in Microsoft Dynamics CRM 2013. Please check our previous posts to create a RSS feed web resource for Microsoft Dynamics CRM Team blog and Twitter user account. In this post we will use these web resources in our dashboard.

Please follow our previous post to get RSS feeds and create web resources for the following URLs.

Once we have all the web resources ready, use the following procedure to create a RSS feed dashboard:

  • Navigate to Settings |Customization | Customize the System.
  • Navigate to Components | Dashboard | New.
  • Select “2-Column Regular Dashboard” from the layout and click on Create.
  • Fill in “Microsoft Dynamics CRM RSS Feeds” under the name TextBox.
  • Please your web resources in the dashboard columns and provide a display name.
  • After placing the web resources it should look like the following screen.


  • Save your dashboard and navigate to the Microsoft Dynamics CRM 2013 home page.
  • Select Microsoft Dynamics CRM RSS Feeds dashboard from the drop down.

Our dashboard will look like the following:


Stay tuned for our next article.

HIMBAP | Need any help in Microsoft CRM 2013 Contact US !!


Filed under JS Script, MS CRM 2013

Enable “Allow to use Credentials for Email Processing” in MS CRM 2013 On-premise Continued

This is our second post to “Allow to use Credentials for Email Processing” field under mailbox, please check our earlier post for first option.

In this post we are going to discuss another workaround to enable this option by adding a register key, we can add register key manually or can use power shell command to add registry key for us. Following are the step required to add it using power shell commands

  • Start Power Shell editor (Navigate to Run->Powershell)
  • Use following commands in powershell editor


  • Close power shell editor
  • Click Ok to close and do IISRESET

Now navigate to mailbox record in crm, you should get “Allow to use Credentials for Email Processing”enabled.


HIMBAP | Need any help in MS CRM 2013 Contact US !!

Leave a comment

Filed under CRM Dvelopment Series, MS CRM 2013

Are you interested in your connection list ??

If you are a sales person and using MS CRM 2011, I am sure you will be interested in your connection lists, so that you can easily associated/disassociate yourself with MS CRM records like account contact.  So how can you see your connection through OOB way, you need to follow below steps:

  • Navigation Setting->Administration->Users->select your record and open it.
  • Navigate to Connection from left navigation items under common section.

You can see all of your connected record.

But what about getting list of your connection directly from left navigation from MS CRM home page that will be great right ? we can easily create link in left navigation are to show view in MS CRM 2011.

So what we need to get that list :

  • Need to create Custom view to display connected entity record with you.
  • Need to get GUID of that view.
  • Modify site map to add new sub area item.

Here is step by step instruction

Create a Custom View to Show connected records and get View ID

  • Create a new Solution and add connection entity in your solution.
  • Navigation to Views under connection entity and select New.
  • Enter “My Connection” under name field and click Ok.
  • Click on “Edit filter criteria” under common tasks.
  • Add filter criteria like below and click Ok.


  • Click on “Add columns” to add required colums (make sure to add Connected From field).
  • Press F11 to get view URL.
  • Copy View ID from last, like below


  •  Save and Close view.
  • Set this view as Default from more actions.

Now we have created a view and fetched it’s guid, so let’s modify our site map.

You can customize site map manually or customize using wonderful tool Sitemap Editor.

I have used sitemap editor here, first you need to connect to your organization using sitemap editor once you are connected Click on “Load SiteMap” button to load default sitemap from your CRM.

Let’s say we want to create sub area item under My work, follow below steps to create new sub area

  • Navigation to Site Map->Area(Workplace)->Group(MyWork).
  • Right click on Group(myWork) and select Add SubArea.

  • Enter below information

         Id : “MyConnection”

          Entity: Connection

          Icon: specify icon this subarea.

          Title : My Connection

          Description: To Show my connection.

          URL: _root/homepage.aspx?etn=connection&viewid=%7bC4EB2710-A6A1-4CFD-BC94-664416807432%7d&viewtype=1039  //make sure to replace viewid with the id that we created

  • Click on Save button to save configuration for subarea.
  • Click on “Update SiteMap” to update sitemap in MS CRM 2011.
  • Start MS CRM you should get your “My Coonection” subarea under MyWork.

 Enjoy !!!

1 Comment

Filed under MS CRM 2011, Sitemap, Step By Step MS CRM 2011

Show Loading message during function execution in CRM Form

I found one question in CRM Development form where user asked to show some processing message during long function execution, we have done this in many projects, so I thought to write this post so that it can be help CRM developers. if you are doing some processing or calling any webservice which is taking time to execute and you want to show loading messsage to user you can use below function

function showLoadingMessage() { = ‘none’;
    var newdiv = document.createElement(‘div’);
    newdiv.setAttribute(‘id’, “msgDiv”);
    newdiv.valign = “middle”;
    newdiv.align = “center”;
    var divInnerHTML = “<table height=’100%’ width=’100%’ style=’cursor:wait’>”;
    divInnerHTML += “<tr>”;
    divInnerHTML += “<td valign=’middle’ align=’center’>”;
    divInnerHTML += “<img alt=” src=’/_imgs/AdvFind/progress.gif’/>”;
    divInnerHTML += “<div/><b>Working…</b>”;
    divInnerHTML += “</td></tr></table>”;
    newdiv.innerHTML = divInnerHTML; = ‘#FFFFFF’; = “15px”; = “1010”; = document.body.clientWidth; = document.body.clientHeight; = ‘absolute’;
    document.body.insertBefore(newdiv, document.body.firstChild); = ‘visible’;

it will display message like below

once processing is done you can hide this message using below code = ‘hidden’;

Enjoy !!!



Filed under JS Script, MS CRM 2011, MS CRM 4.0

Some useful learning resources for MS CRM 4.0 and MS CRM 2011

Some day back I got a request mail to provide some learning resourc for MS CRM 4.0 and MS CRM 2011 for new CRM developers. I have already a post for MS CRM 2011, in this post I am going to provide some learning resoures for MS CRM 4.0, which is very helpful for any crm developer

MS CRM 4.0 Resource center

MS CRM development resource in MSDN


Channel9 videos for MS CRM 4.0

MS CRM 4.0 online book

MS CRM Team Blog

MS CRM Development Forum

MS CRM Blog List

Microsoft Dynamics CRM Community site

let me know if I am missing some resource, so that I cam update my post.

Enjoy !!!


Filed under MS CRM 4.0

Index was out of range. Must be non-negative and less than the size of the collection- MS CRM 4.0

Most of the time you will get this error when you will try to retrieve data from Grid View, and it has no rows. But if you have rows in Grid View, make sure you have enabled view state. If you have already enabled view state but you are still getting this error and you have deployed your webapplication under ISV folder in MS CRM 4.0, then here is the issue.

MS CRM web.config file overrides setting of your web application, so you need to specifically change web.config file of MS CRM. You need
to change lines in web.config file like below

<pages buffer=”true” enableSessionState=”true” enableViewState=”true” validateRequest=”false”/>

                                   <sessionState mode=”InProc”/>


Enjoy !!!


Leave a comment

Filed under MS CRM 4.0

Order is edited by multiple users Error

In my current project we have integrated order with our financial system and also we are using third party tool to generate order line items. After some time in production we started getting issue “Order is edited by multiple users” , and we were getting this issue only some times. After doing lot’s of testing what I found my order update plugin is called multiple times. After doing lot’s debugging what I found in my plugin context.depth is 1 but ever time correlationId was different. So I solved this issue by including below code in my plugin

if (_CorrelationID == Guid.Empty)
_CorrelationID = Context.CorrelationId;
if (_CorrelationID != Context.CorrelationId)
// rest of the code
{//handle exception}
_CorrelationID= Guid.Empty;}
This piece of code fixed my issue


Filed under MS CRM 4.0, Workflow & Plugin Development

An error occurred while parsing EntityName

While integrating CRM orders to our custom financial system webservice I got error “An error occurred while parsing EntityName” in my plugin. Our custom financial service accepts xml string as input, so while sending data in xml form, sometime account name contains special character like ‘&’ which is a illigal character in I wrote below function to replace illigal characters in xml request

private string FormatText(string XmlRequest)
string _ModifiedXML = XmlRequest.Replace(“&”, “&”);
_ModifiedXML = _ModifiedXML.Replace(“”, “>”);
_ModifiedXML = _ModifiedXML.Replace(“‘”, “'”);
_ModifiedXML = _ModifiedXML.Replace(“””, “"”);

return _XmlRequest;

Hope it will help somebody !!!

Leave a comment

Filed under MS CRM 4.0