My Photo

Microsoft Dynamics 365

Official Blog for Microsoft Dynamics Functional and Technical Solutions....
Browsing Category " mscrm 2015 "

Unable to Connect Plugin Registration tool with MS CRM v9 / D365 SDK


Not able to login Plugin registration tool (Keep popping up for Credentials)


1. Update latest SDK from the Download tools from NuGet or Quick start Plugin Registration Tool V9.0.0.7

For downloading the latest PRT from VS Nuget packages - this link might be useful

2. Modify using TSL to 1.2 through Fiddler .

Step 1 Open Fiddler and navigate to Tools - Options - HTTPS Tab

Step 2 Under HTTPS tab click on to Protocols link - a Popup will come change the TLS vesion from 1.0 / 1.1 to tls 1.2.  i.e. " <client>;ssl3;tls1.2 " and press on ok

Now you will be able to connect to your CRM v9 Organisation with PRT

Happy CRMing 😊


Validation to accept only Numeric Character in MS CRM

Below script is a generic validation which will show for error if field is having anything except numeric value

function ValidateOnlyNumeric(context) {
    var fieldname = context.getEventSource().getName();
    var phone = Xrm.Page.getAttribute(fieldname).getValue();
    if (checkFormat(phone)) {
    } else {
        Xrm.Page.getControl(fieldname).setNotification("Please enter only numeric characters");
function checkFormat(phone) {
    var regex = /^\d+$/;
    if (regex.test(phone)) {
        return true;
    } else {
        return false;

To enable it for any field just register it on change of the required field with function name “ValidateOnlyNumeric” and check “Pass execution context as first parameter ” and save an publish it will start working

Hope it helps

Happy Coding 😊

CRM Rest Builder for Dynamics CRM D365 / MSCRM 2013, 2015, 2016

Navigate to the below URL and Download the latest version of the solution of CRM Rest Builder

For 2015 & 2016 & D365 use the v2.5.0.0 release
For 2011 & 2013 use the v1.5.0.0 release

1) CRM Rest Builder GIT Hub URL
2) CRM Rest Builder Drive  v2.5.0.0 , v1.5.0.0

And follow the below steps

Step 1 - Navigate to your Organisation Settings -> Solutions and click on Import Button

Step 2 - Click on to Browse Button

Step 3 - Navigate to the solution file previously downloaded and click on open and then click on Next

Step 4 - Click on to Import Button

Step 5 - After some time you will see the below success message

Step 6 - Now you will be able to see the CRM Rest Builder Button on the ribbon bar on solutions Click on it

And You are good to go with CRM Rest Builder

Happy CRMing 😊


Get / Retrieve all Entity Metadata from an organization in MSCRM 2011, 2013 ,2015 usin C#

Below Code Retrieve all entities , who's Responce can be used to bind entities to drop down or grid etc .

 RetrieveAllEntitiesRequest req = new RetrieveAllEntitiesRequest();
            req.EntityFilters = EntityFilters.Entity;

            RetrieveAllEntitiesResponse resp = (RetrieveAllEntitiesResponse)service.Execute(req);

            foreach (var entity in resp.EntityMetadata)
                //bind it with dropdown ETC


Hope This Helped You Thanks For the Support , If Any query or suggestion , please comment below

SOURCE : JUST2CODE.IN Subscribe to our YouTube channel :

Activate / Deactivate a record using c# in MS CRM 2011 , MS CRM 2013 , MS CRM 2015 ( using SetStateRequest )

hey , as we offensively get requirement to activate and reactivate a record then we start using update event , but there is a very simple method to do so , by using SetStateRequest : it require an assembly " microsoft.crm.sdk.proxy.dll " and using " using Microsoft.Crm.Sdk.Messages;" .
Code will be :
   SetStateRequest req = new SetStateRequest();
             //the entity you want to change the state of
   req.EntityMoniker = new EntityReference("new_abc", recordId);
            //what should the new state be
    req.State = new OptionSetValue(1);
           //Pick an option from the status reason picklist to specify reason for state change
    req.Status = new OptionSetValue(2);
    SetStateResponse resp = (SetStateResponse)service.Execute(req);

Fields that are not valid were specified for the entity - Importing Solution Error mscrm 2011 , mscrm 2013 , mscrm 2015

Hey , I was importing a solution today from an other Organization and got a Error new to me :  Fields that are not valid were specified for the entity , as there was no description i was little confused , but after few R&D came up with perfect resolution of the error .


  • Organization "A" conatined attribute 'new_mscrm' that was of type "single line" ,Later  We changed that the field  to be an currency Type.
  • But in Organization "B" was containg same field 'new_mscrm' of type "Single line".
  • When we tried to import back the new solution to test environment we got this Import failure