Category Archives: CRM Dvelopment Series

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

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

Dynamics CRM Development Part – 2

After creating CRM environment, now it’s time to start our development.Sometime we need to implement some new functionality in CRM that CRM does not provide OOB. Then crm customization and development comes in picture, so basically we can say that CRM development is a result of our CRM Extension plan. Dynamics CRM is a highly extendable application, we can extend it according to your business needs,for more information you can check Dynamics CRM Extensibility Architecture. We can extend Dynamics CRM using Client Side and Server side code. Java script is used for Client side programming and for server side programming we can use C# or we can use crm webservices and API to extend it. Dynamics CRM provided basically three webservice

1      CrmDiscoveryService – used to get organization information

2      CrmService– used to interact with CRM Data

3      MetadataService– used to modify data structure

Now the question is where we can use CRM webservices or API.we have different option, where we can do our development for Dynamics CRM for example

  1. CRM Form and Field events. (for JS code)
  2. Plugin. (for server side code)
  3. Custom workflow. (for server side code)
  4. Custom Integration. (for server side code)

I will discuss on these points one by one in my development series. So let’s start with using CRM form and field events. Dynamics CRM form comes with two basic events Onload and OnSave. you can use Onload event to write JS code for different purpose,for that we use the most important property of CRM form “FormType”, which helps us to detect form’s mode, for example if the form is opened in create mode,update mode,readonly mode etc. you can check FormType property as below


{           // Create mode                  }

else if(crmForm.FormType==2)

{  //Update mode        }

 for all FormType value you can check . Another thing that I want to point out here is that as we can use FormType property to detect form’s mode on onload in the same way we can use Event.mode on onsave event. We can use Event.mode to check for which purpose Onsave event is called. we can use below JS to check event.Mode value on onsave event


For all possible value of Event.mode you can check, another good resource for the same is (thanks to Tanguy,for this wonderful post).

All CRM field comes with onchange event.But you can add another JS event for crm field,  for example if you want to call some code on onclick of crm field you can use as below  code on form load event


{alert(“ Mouse click”);}

I will request you to check for different data types that Dynamics CRM supports you can check.  So Javascript can be used for multipurpose, you can use JS code to retrieve crm data with the help of crmservice refer  to use all crmwebservice method through JS. We can write JS code on ISV.config  file while creating custom button. but while using JS code in ISV.config you should keep in mind to replace some character with their encoded value like below

Character                                          Encode Value

<                                                               &lt;

”                                                                 &quot;

&                                                               &amp;

you can write JS code to load iFrame content dynamically. You can check my various post that I have written to use JS code in Dynamic CRM.

I hope this post will help you to understand basic use of JS in Dynamics CRM development, so in next part I will discuss about plugins.


Filed under CRM Dvelopment Series

Dynamics CRM Development Part – 1

How to Create Development Environment for Dynamics CRM 4.0??

What are the software and Hardware Requirement for Dynamics CRM 4.0??

How to start Dynamics CRM 4.0 Development ??

Where we need to code in Dynamics CRM 4.0 Development ??

What language we can use in Dynamics CRM 4.0 Development ??

What are the libraries available for Dynamics CRM 4.0 Development??

I have seen this type of question many times in many CRM forums. When a technical guy starts CRM Development, he has lots of question in his mind related to MS CRM Development, I also had the same when I started CRM development, and I found this type of information is scattered on net and not easy to find for fresher. So I decided to write a series for CRM development. I will try to cover all information that any fresher required for CRM Development. So I think before starting writing CRM Development series I should define what is Dynamics CRM, also before Dynamic s CRM let’s start with CRM. What is CRM – CRM stands for Customer Relationship Management, it’s basically a way of managing customer, retaining old customer and attracting new customer by providing them the functionality, set of features that they require to manage their business. Microsoft CRM is a part of CRM family. This is also known as Dynamics CRM because it’s a part of Dynamics Product by Microsoft. It has basically four modules Sales, Marketing and Service. I am not going to detail all these modules. You can find more details about Dynamics CRM Modules and features in  and for different Dynamics CRM server option you can check my below post

Let’s focus on our Development part. First thing that we need for starting development is the Development; I love to use MS CRM VPC for my development work and R & D.  You can download latest VPC from Partner Source , but remember you should be a Microsoft partner for that.

Off course a better approach will to build your own Development server, if you want to familiar with Dynamics CRM installation process. You can refer below link to get all software and hardware requirement for Dynamics CRM

Microsoft Dynamics CRM 4.0 system requirements

You can download Microsoft Dynamics CRM 4.0 Implementation Guide from below link

This Guide includes:

  • Planning Guide:
  • Installing Guide:
  • Operating and Maintaining Guide:
  • Microsoft Dynamics CRM 4.0 Implementation Guide Compiled HTML Help (CHM)

So let’s first create development environment 🙂 , I will come back with next part CRM Development Part – 2 where we will talk about different CRM Development options.

Leave a comment

Filed under CRM Dvelopment Series