Posted in Uncategorized

The CRM Mailbox incoming and outgoing email field is setting to “None” Microsoft Dynamics CRM 2016

I had a strange issue in production ,so whenever we were doing a deployment ( reference data +solution). After the deployment the mailbox settings incoming email and outgoing is getting set to “None” rather then “Server – side synchronous or email router”.

After performing multiple steps/deployments; I  found the solution to this issue.

I use migration utility tool to export and import the reference data.

Please see below steps:

  1. Removed the default mailbox field from the queues schema, exported the data and deployed to internal test. However it didn’t work and still was taking the incoming outgoing setting from dev; hence made it none again. <field displayname=”Mailbox” name=”defaultmailbox” type=”entityreference” lookupType=”mailbox” />



2. Then I started looking these two fields (incoming and outgoing email) in the schema and found below :

<field name=”incomingemaildeliverymethod” value=”0″ />

<field name=”outgoingemaildeliverymethod” value=”0″ />


I removed these two properties and I could see it was excluded from the mailbox update.


moral of the story : queue will have so many fields dedicated for its mailbox. we have to make sure what will update what.

hope this helps


Posted in Uncategorized

Microsoft Dynamics CRM 2016/2015/2013- Dynamic and Static Marketing List

This has been a most population concept in marketing module of CRM ; i would like to share some crucial difference between them:

Dynamic marketing lists is able to save time and ensured that everyone that should be on the list was on the list.

A Static marketing list is a snapshot in time. You add the contacts you want in that marketing list depending on certain criteria…and that was it. If a new contact is added to the CRM database you can manually add them to the marketing list, or if the marketing list is no longer relevant to a contact you can manually remove them.

Dynamic marketing lists removes the manual element. You can create a query (e.g. all customers where their country equals Ireland). This means that any contacts with “Country = Ireland” will be added to the list. As you add new contacts to the CRM database, they will automatically be added to the marketing list if they live in Ireland. If a contact moves and the Country field in the contact card is updated, then they will be automatically removed from the marketing list.


Some other major differences below :

Dynamic List Static List
Member types Leads, Contacts or Accounts Leads, Contacts or Accounts
Adding members The query to select members automatically adds records which meet the criteria You can manually add records using the Add to Marketing List button
Manage Members – Add records using a lookup
Manage Members – Add records using an advanced find
Removing members Members are automatically removed if they no longer meet the dynamic list query criteria Manage Members – Advanced find to Remove records
Manage Members – advanced find to evaluate members
Blocked attribute You cannot block a dynamic list (you can use the copy to static button to copy the members of a dynamic list to a new static marketing list) You can block a static list, which stops members being added or deleted.
Updating list members automatic Manual – a static list has to be updated manually.
deactivated records/members Automatically excluded from the list
Can lists be added to a campaign Yes – All marketing lists can be added to a campaign and both static and dynamic can be added to the same campaign Yes – All marketing lists can be added to a campaign and both static and dynamic can be added to the same campaign


Happy CRM 🙂 cheers!!

Posted in Certifications

Sample Questions & Tips for MB2-716 – Microsoft Dynamics CRM 365 Customization & Configuration

Hi Guys, I have recently passed MB2-716 ; hence thought putting some sample questions and tips on the this exam.

Hope fully it helps :

Which two series aggregate functions are only available on numeric field data types? Each correct answer presents part of the solution.

  1. Count: Non-empty
    B.    Count: All
    C.    Avg
    D.    Max

Answer: CD

Which of the following chart types can be configured as an organization-owned chart but not as a user owned chart?

  1. bar and line
    B.    tag or doughnut
    C.    line and multi-series
    D.    area and funnel

Answer: B

You are implementing a Lead to Quote business process. The process will update the Lead. Account Contact, and Quote entities. You need to create a business process flow (BPF) that spans the entities.
What should you do?

  1. For each stage, specify the step.
    B.    Add a workflow.
    C.    Use a composition.
    D.    Add a stage and specify the properties for each entity.

Answer: D

You need to create a business process flow (BPF) that spans multiple entities. Which of the following statements is true?

  1. You can use entities that have N:N relationships.
    B.    The same entity cannot be used twice.
    C.    Relationships must exist between entities.
    D.    You can include a maximum of five entities.

Answer: D

BPF can have 1: N Relationship, we can add same entity in different stages. Relationship is recommended between entities but can be set as None.

You create a business rule for the Account entity.
The business rule must nin when you import account records. Which two conditions must be true? Each correct answer presents a complete solution.

  1. The scope was set to Entity.
    B.    The scope was set to Account.
    C.    A business rule is active.
    D.    A business rule snapshot was successful.

Answer: AC

You are implementing a new business process.
The system must send a notification to the manager 24 hours after an opportunity Is created based on the date of the next best action.
Which type of workflow should you implement?

  1. synchronous workflow
    B.    asynchronous workflow
    C.    Microsoft Dynamics 365 dialogs
    D.    business process flow (BPF)

Answer: B

You create a business rule for the Case entity and set the scope to Case (form). Which action will cause the business rule to run?

  1. The form loads.
    B.    An asynchronous workflow updates the record.
    C.    An asynchronous workflow creates a record.
    D.    The record is saved.

Answer: A


Which action can you perform by using a business rule?

  1. Subtract $5.00 from a currency field.
    B.    Clear a two options field.
    C.    Concatenate two text fields.
    D.    Add six days to a date field.

Answer: D

You create a workflow and set the scope to User (default). User A owns the workflow. User B is making bulk changes on records that will trigger the workflow. Which records will this workflow affect?

  1. records owned by users in the same business unit as User B
    B.    records owned by User A
    C.    records owned by User B
    D.    records owned by either User A or User B

Answer: B

You are a subject matter expert for an insurance company. You have a complex business method that is used for settling and releasing claims.
You need to create a process in Microsoft Dynamics 365 to assist team members with the claims settlement process. You must limit this process to team members that have a specific security role.
What should you implement?

  1. business process flow (BPF)
    B.    workflows
    C.    custom actions
    D.    dialogs

Answer: A



please leave a comment or mail me at for any question.



Posted in Deployment, Uncategorized

Microsoft Dynamics CRM Import Error 0x80040237: Cannot insert duplicate key

When looking at the import log, check whether the error occurred below the “Entity Ribbon” Item Type:

error import

If this is the case, the most likely cause is duplicate or corrupt CustomControlDefaultConfigs. These are the control configurations that you can add as part of the CRM 2016 new features.  Some forums indicate that there are bugs in CRM for transporting these records which were fixed in SP1, Service Update 5. In the meanwhile the easiest workaround identified so far is to delete from source environment the CustomControlDefaultConfigs following these steps:

  1. Identify which entity caused the failure. For example, from the screenshot above we can see the failure comes from the particular entity.
  2. Open the solution customizations.xml file and find the problematic entity. Under that entity find the CustomControlDefaultConfigs node and extract the Guid(s) of the default CustomControlDefaultConfigId:xmlnew
  3. Now delete from the source environment this record. This cannot be done via UI unfortunately so it must be done using the API. Below is an example line of code on how to achieve this:

service.Delete(CustomControlDefaultConfig.EntityLogicalName, new Guid(“404c2f18-9142-e611-80df-000d3ab010db”));

  1. Publish all customizations in source environment
  2. Verify in database of source environment that the record is deleted. This line should return no values (replace with the appropriate GUID):

select * from CustomControlDefaultConfig where CustomControlDefaultConfigId = ‘404c2f18-9142-e611-80df-000d3ab010db’


  1. Re-export the solution and import again.


Hope this helps!


Posted in Uncategorized

Microsoft Dynamics CRM form on load error with or without javascript

Users Sometimes experience an error while opening a contact/any entity. Its an intermittent error and not reproducible all the time and for all users.

Error looks like this in Dynamics CRM UI :



When you download the error logs ; below is found:

TypeError: Cannot read property ‘form_onload’ of undefined

    at eval (eval at RunHandlerInternal (http://organization/form/ClientApiWrapper.aspx?ver=2115568044:153:1), <anonymous>:1:42)

    at RunHandlerInternal (http://organization/form/ClientApiWrapper.aspx?ver=2115568044:158:1)

    at RunHandlers (http://organization/form/ClientApiWrapper.aspx?ver=2115568044:117:1)

    at OnScriptTagLoaded (http://organization/form/ClientApiWrapper.aspx?ver=21



I created a solution, added the contact entity with forms and exported the solution. Opened the customization XML and found below.

The error has to do with InternalHandlers that is calling a library and a function form_onload  which is somehow attached to this event Hence I had commented out the below InternalHandler property.


<event name=”onload” application=”true” active=”true”>


                    <Handler functionName=”Mscrm.ContactMainSystemLibraryWebResource.form_onload” libraryName=”Contact_main_system_library.js” handlerUniqueId=”4ea24ebd-795d-434e-af94-6812c3867b54″ enabled=”true” />

                  </InternalHandlers> –>


<Handler functionName=”custom function” libraryName=”contact.js” handlerUniqueId=”{a2a97e43-583d-a4be-3dcb-2369a34a4193}” enabled=”true” parameters=”” passExecutionContext=”false” />




Saved the customization.xml file and zipped the solution; imported back to CRM.

Hope this helps!


Posted in Uncategorized

How to setup a mock service in SOAP UI. See CRM output XML. Integration Plugins Microsoft Dynamics CRM 2016/2015/2013

During my Career in CRM dynamics, I have struggled a lot when it comes to seeing what is going out of CRM so that it can be used to investigate things.

Especially the people who involve in a lot of triaging of issues & developing integration plugins and needs to validate it.


  1. WSDL of the target service.
  2. SOAP UI(any version would work)
  3. Up and running server where you have SOAP UI installed.

Open SOAP UI and create a new project:

wsdlBrowse to the WSDL and click okay.

now it’s time to generate a mock service:

once you have imported the WSDL it will show all the services it contains.You have to select the one you want a mock service for. and then right click on it and say generate mock service like below:

generate mock

once you do that it will give you the list of operations and the path of the mock service.

Verify the same and click okay:


here you go your mock service is ready:


Now you might have to modify the response you are getting from mock service to do that double click on the service (e.g here “buy”) than on the response add whataver you need.

close the box. click on the green button to run this service.addresponse

now in order for your CRM to reach to this service you have to configure this end point. either in your config file or if you read it from a custom entity in CRM.

now the endpoint would be the combination of your server address for.e.g.

you can get the mock service Path from the custom properties box on the left bottom.side.


once you do that all you have to do is to trigger the action and once you do that you have the request coming in the mock service in the below section:


double click on that than on the option format XML to see the XML you need.


Hope it helps.


Posted in Uncategorized

How to enable encryption on microsoft dynamics crm 2016/2015/2013/365

Hi, Guys! I am going to show you today how to enable encryption in Microsoft Dynamics CRM. But first let’s have a look why one would want do that:

  1. you are not able to create queues.
  2. you are not able to create mailboxes.

In short, all confidential stuff in CRM where you require a user name or password it will be disabled if you have encryption disabled.

if you try to take action mentioned above you will get this error:

“There are encrypted fields in the organization database, but the data encryption feature isn’t activated. Contact your Microsoft Dynamics CRM system administrator to activate data encryption. To activate, go to System Settings > Data Management > Data Encryption…”

According to the error, to enable encryption we need to go into Data Encryption under Data Management. However, we can only enable Data Encryption if Dynamics CRM is using the https protocol, and usually, the reason we’ve done a backup/restore is that we’re setting up a Dev or UAT copy of Prod, which may not need to be https.

Data Encryption Errors After Restoring Microsoft Dynamics CRM Database

This error states that “The HTTPS protocol is required for this type of request. Enable the HTTPS protocol and try again.” However, enabling https may not be ideal, and we still need to be able to use the system.

Fortunately, there is a SQL script we can run on the config database which will allow us to use data encryption without using the https protocol:

UPDATE [MSCRM_CONFIG].[dbo].[DeploymentProperties]
SET [BitColumn]=1
WHERE ColumnName=’DisableSSLCheckForEncryption’

You shouldn’t do this on a production instance, but for Dev or UAT instances this is necessary.

Once that’s updated you need to do an IISRESET on the CRM server for the changes to take effect.

If we try opening that Data Encryption window again, we should see that encryption is disabled, and we can create a new key and activate it.

Data Encryption Errors After Restoring Microsoft Dynamics CRM Database

You should be able to get the encryption key from the original CRM system you backed up from. If not, then you can simply create a new encryption key.

When you activate, you might be faced with another error which states “Please select an account that is a member of the PrivUserGroup security group and try again”

Data Encryption Errors After Restoring Microsoft Dynamics CRM Database

A simple solution to this issue would be to use an account with which the CRM instance is installed or add this user to the security group mentioned in the error.




Posted in Uncategorized

Get lookup value from other entity and set it on the form using Web API in Microsoft Dynamics CRM 2016

In this blog i am going to show you , how you can retrieve a lookup value from other entity in CRM 2016 using web api and set it on the form.

we know how its done in Odata but its time for some Web API action.

let see how its done here 🙂

function yourFunctionName() {

var lookup= Xrm.Page.getAttribute("fieldname").getValue();  //you will get the id with exxtra double quotes or square brackets by doing get value hence you to make it readable by CRM , you must slice it. i have use the below method:
var newid = lookup[0].id.slice(1, -1);  // you will get perfect id like "EDCJDKDJDKJDJDKJDJKD" here.
var req = new XMLHttpRequest(); //once you have the id , you have frame to make a webapi GET call by proving the newid we got."GET", Xrm.Page.context.getClientUrl() + "/api/data/v8.1/entitypluralname(" + newid + ")?$select=_prefix_fieldname_value", true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
req.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var result = JSON.parse(this.response); // you will get the retrieved value in object we stored in result var.
var retrivedvalue= result._prefix_fieldname_value; //get the id of the field
var retrivedformatedvalue= result["_prefix_fieldname_value@OData.Community.Display.V1.FormattedValue"]; //get the formatted name of the field
if (retrivedvalue!= null) {
var value = new Array();
value[0] = new Object();
value[0].id = retrivedvalue;
value[0].name = retrivedformatedvalue;
value[0].entityType = "entityname";
Xrm.Page.getAttribute("fieldname").setValue(value); //set the lookup value finally
alert("some textt!!!!!!") // optional
} else {

you can call this function on change of the field.

i hope this helps!!  🙂


Posted in Uncategorized

how to retrieve lookup value and set it on another lookup field in Dynamics CRM 2016 Javascript

In this blog i am going to show how you can retrieve a lookup value and set it.

for e.g if you need to set one contact which in a regarding field on an activity to another contact field.

use the below simple JavaScript:

function yourFunctionName()

var lookup = new Array();  // create a new array
lookup = Xrm.Page.getAttribute("regardingobjectid").getValue(); // get field value
if (lookup != null) 
var name = lookup[0].name; // get the name of the record
var id = lookup[0].id; // get the  id of the record
var entityType = lookup[0].entityType; // get the entitytype
now we have retrieved all information that we needed ; its time we set it 🙂

if (entityType == "contact")
{ // ignore this step if its not a multilookup field
var value = new Array(); //create a new object array
value[0] = new Object();
value[0].id = id; // set ID to ID
value[0].name = name; //set name to name
value[0].entityType = "contact"; //optional
Xrm.Page.getAttribute("from").setValue(value); //set the value.

Call this function on Onload of the required form.

hope it helps !!