Select Page
CRM 2013 QuickStart Book now available!

CRM 2013 QuickStart Book now available!

CRM 2013 QuickStart

CRM QuickStartBrought to you by the same team you’ve already learned from in The CRM Field Guide, Building Business with CRM and more.  As always we bring you internationally recognized CRM experts, all of the authors are current Dynamics CRM MVPs. (Myself,  David Yack, Joel Lindstrom, David Berry, Richard Knudson and Jukka Niiranen)

Go to the site crm2013quickstart.com and purchase your copy today.

(more…)

Me and My CRM Developer Toolkit

I have been a big evangelist of the CRM Developer Toolkit for some time now and it continues to become more and more of a key component of all of the projects that my company engages in.

Our chosen project delivery methodology is Agile and as a result the Deployment optimisation in terms of ease of use and time to deploy provided by the CRM Developer Toolkit provide a significant benefit to our projects, so much so that when we recently took over a large project, the customer had previously been exposed to deployments of between 2 and 5 days and a 58 page installation manual for each deployment, that required step-by-step accuracy in order to complete a successful deployment.

Now deployment takes 15 mins, there is a 2 page installation guide and the deployment can be done by anybody.

Over the next few weeks I will be posting on how we make use of the CRM developer toolkit, some of the quirks and some changes and enhancements that me make to it, including how to make it fully support 64-Bit deployments on a Windows 2008 R2 CRM Server environment (Out of the box it only handles 32 Bit Windows 2003 deployments)

Creating a new CRM Development Project using the CRM Developer Toolkit

For todays post we are going to look at how I go about setting up a new Visual Studio project for a CRM Project using the CRM Developer Toolkit.

I am not going to go through how to setup your development environment or how to install the CRM Developer Toolkit bits as this is adequately covered in the Customizing CRM by Using the Microsoft Dynamics CRM Developer Toolkit guide that comes with the CRM Developer Toolkit

While the CRM Developer Toolkit talks about using TFS for source control, we have currently opted to use SVN (mostly as I find it a whole lot simpler than TFS) but you can use either.

So to start off you run the setup.cmd from the CRMSolutionFramework folder using the following syntax : Setup.cmd {InstallDir} {ProjectName} {Project Long Name} {Organisation Name}

image

So for me I called the project ToolkitDemo and put it in a folder C:\Projects and connected to a CRM organisation called MicrosoftCRM.

image

Next I add the Solution to SVN

image

The reason I add it now is so that we can ensure Source Control doesn’t have any unnecessary files that are generated by the build as it just makes the repository bigger, and all those files can be recreated just by doing a build.

Some Tweaks and Fixes

The following are some tweaks and fixes that I make to a new project.

The CRM Developer Toolkit includes a project called “BatchService” which enables the installation and use of a Windows Service to perform scheduled tasks. I like to disable the installation of this until you require it. To do that you need to modify the build events for the BatchService project, by right clicking on the BatchService project under Services in your solution and going to Properties, you then go to the Build Events section and comment out or remove the Pre-build and Post-build event command line.

image

Changed to :

image

Next I modify the website path (for the build) for both the CustomWebPages project and the CustomWebServices project to ensure that they deploy into the ISV folder where I want them to.

To do this you right click on the CustomWebPages and CustomWebServices projects under the ISV tree in your solution and select Unload Project and then right click again and select Edit Project.

image

For the CustomWebService project you need to modify the following code in the first PropertyGroup section to suite your requirements :

  1. <!– Custom Property: Defines if Website should be copied to CRM ISV Folder –>
  2.  <PublishWebsiteToCrm>true</PublishWebsiteToCrm>
  3.  <!– Publisht to an alternative folder – default is project name –>
  4.  <PublishedCrmFolderName>xRM\WebServices</PublishedCrmFolderName>

The <PublishWebsiteToCrm> tag determines whether or not to publish to the ISV folder and the <PublishedCrmFolderName> tag determines where to publish it in the ISV folder, so in this example our custom web services will be deployed to ISV/xRM/WebServices folder.

The resulting PropertyGroup section should look like this :

  1. <PropertyGroup>
  2.     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  3.     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  4.     <ProductVersion>9.0.30729</ProductVersion>
  5.     <SchemaVersion>2.0</SchemaVersion>
  6.     <ProjectGuid>{4C7AF20F-A0FB-4DAF-8F10-48C258E38510}</ProjectGuid>
  7.     <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
  8.     <OutputType>Library</OutputType>
  9.     <AppDesignerFolder>Properties</AppDesignerFolder>
  10.     <RootNamespace>ToolkitDemo.WebServices.CustomWebService</RootNamespace>
  11.     <AssemblyName>ToolkitDemo.WebServices.CustomWebService</AssemblyName>
  12.     <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
  13.     <SccProjectName>
  14.     </SccProjectName>
  15.     <SccLocalPath>
  16.     </SccLocalPath>
  17.     <SccAuxPath>
  18.     </SccAuxPath>
  19.     <SccProvider>
  20.     </SccProvider>
  21.     <!– Custom Property: Defines if Website should be copied to CRM ISV Folder –>
  22.     <PublishWebsiteToCrm>true</PublishWebsiteToCrm>
  23.     <!– Publisht to an alternative folder – default is project name –>
  24.     <PublishedCrmFolderName>xRM\WebServices</PublishedCrmFolderName>
  25.   </PropertyGroup>

You will need to add these lines to the CustomWebPages project as they do not exist by default.

The above changes ensure that when running our DevBuild.bat process that these sites are deployed where we want them, in order to ensure that when we create our MSI’s for deployment using the DailyBuild.bat that the websites still go where we expect them we need to make some changes to the WIX (Windows Installer XML) templates for our MSI packages.

To do that we need to modify the Main.wxs.template files in \BuildScripts\Packaging\ToolkitDemo.ISVPages\Templates and \BuildScripts\Packaging\ToolkitDemo.ISVWebServices\Templates

For ISVPages you need to modify the following tags :

  1. <Directory Id="ISV_DIR" Name="ISV">
  2.               <Directory Id="CUSTOMPAGES_DIR" Name="Custom" LongName="xRM">
  3.               </Directory>
  4.             </Directory>

and change the LongName value to what you want, in my case “xRM” and for the ISVWebServices you need to make a similar change but also need to add a subdirectory called WebServices so it would look like :

  1. <Directory Id="WEBBIN_PATH" Name="bin">
  2.             </Directory>
  3.             <Directory Id="ISV_DIR" Name="ISV">
  4.               <Directory Id="CUSTOMPAGES_DIR" Name="Custom" LongName="xRM">
  5.                 <Directory Id="WEBSERVICE_DIR" Name="WebSvc" LongName="Webservices">
  6.                 </Directory>
  7.               </Directory>
  8.             </Directory>
  9.           </Directory>

If you are doing a deployment to the c: drive or another drive other than d: then you need to make a few changes as well (although you can change these at runtime of the installer, if you repeat the deployment process many times it gets a bit arduous)

Modify the DeploymentDefinitions.xml file in the BuildScripts\bin\Deploy\1.0\Framework directory. Change the following 2 properties to match the drives you are using :

  1. <Property
  2.         Name="DeploymentShareName"
  3.         Category="Connection"
  4.         Description="Which share to connect to on the deployment host.">d$</Property>
  5.         
  6.     <Property
  7.         Name="DeploymentPath"
  8.         Category="Connection"
  9.         Description="On the deployment target, which drive is used.">d:</Property>
  10.         

 

Also change the following property in the PropertyDefinitions file in \BuildScripts\Deployment\DeploymentProperties  :

  1. <Properties xmlns="urn:sdc-microsoft-com:deployment:properties:v2.0">
  2.   <Property Name="INSTALL_ROOT_DRIVE" Value="D:\\cf0 " Category="Setup" Description="The root drive into which install the application." />

You need to make the same changes to the Sample.proj and Sample.xml files in \BuildScripts\Deployment\RigTemplates

I also usually change the Import Batch Size key in the PropertyDefinitions file fro 5 to 20. The Deployment installer imports CRM customisations in batches of x entities at a time, so using 5 makes the install take a little longer than changing it to something like 20.

  1. <Property Name="CRMSVC_IMPORT_BATCHSIZE" Value="5" Category="CRM" Description="The number of entities to import together in a batch." />

I would then commit the above changes to Source Control.

Next I would run a DevBuild.bat

image

After the Devbuild has completed, do a commit and add everything to the Ignore list so that any files created by the build are never committed to Source control

image

Follow the same process as above but for the DailyBuild.bat

You are now ready to start using the CRM Developer Toolkit.

Look out for some of my upcoming posts which include the following and more :

  • Enabling Automatic Build Number Generation in the CRM Developer Toolkit
  • Adding a WorkflowPlugin Project to the CRM Developer Toolkit
  • Fully Enabling 64 Bit Support for the CRM Developer Toolkit
  • Understanding MSBuild Tasks
  • and more ……

Tool of the Not So Week – Episode 3

“The Microsoft CRM Plug-In Debugger” is the tool I am putting forward this week.

Over the past few weeks I found myself in some lengthy discussions on a project I am currently working on and one of the major topics of conversation was around unit testing of code, something which I don’t believe typically gets done very well by Microsoft CRM Developers.

The CRM Developer Toolkit (mentioned a while ago on my blog) provides the capability to incorporate Unit Testing into your Development and Build processes, however Unit Testing of the actual plug-in calls can’t be done as it stands as you invariably need to have the CRM Plug-in Context…. enter “The Microsoft CRM Plug-In Debugger”

This little Class allows you to create a Mock CRM Plug-in Interface in order to test your plug-in code without the need to deploy it to CRM.

Check it out, it can save hours in debugging time.

P.S. Watch this space as I am finally finding the time to write the promised posts on the CRM Developer Toolkit.

Tool of the Week – Long Overdue Episode 2

Amid some fantastic xRM deals and all the extra effort my team and I have had to put in over the last month while facilitating the phenomenal growth of my company, my “Tool of the Week” as was very nicely pointed out to me by one of my colleagues has unfortunately not been so weekly…. we can dream though 🙂 …. and continue to persevere at trying to maintain the regular routine of these ideas.

So…. in the spirit of trying to get back on track I will dive straight into the next “Tool of the week”

This tool review is as a result of a recommendation from @seanvowles though I must say that I agree with him that it is a really great tool and also a rather apt time to mention it as it has just recently had a new release.

The tool is the CRM Configuration Manager, currently v1.50.

The CRM Configuration Manager is designed to help you work better with the Customisations in your CRM environments, overcoming some of the limitations of the “out-of-the-box” capability.

The most notable advantages are the ability to export just the modifications in a CRM system (compared to an earlier customisation export) as well as the ability to extract and export (and then re-import) the JavaScript associated within the entities, allowing you to more easily modify these scripts using an external editor like Visual Studio.

Additionally you can write your own, or purchase additional add-ins for the product an example of which is the Microsoft Word Add-In which can be used for various scenarios including :

Documentation

•Document your work after it’s finished, removing any possible mismatch from the specifications.
•Understand the work of others when taking ownership of a CRM instance without any documentations provided (Using the filters to export only Custom Entities, Attributes and Relationships)
•Presents all your ISV Configuration changes in one place, that usually are hard to get a good overview of.

Daily work routines

•Development Aid, use a complete export document as a reference.
By searching in the document for a specific entity you can quickly see available picklist values, implemented JavaScript, published attributes on form and attributes schema name including data type restrictions.
•Architect Aid, Cut & Paste attribute, forms or relationships Tables to your specifications, and extend them with new values or describe changes”

image

I hope you find the same value in the tool as I have.

Customer Portal Accelerator : Handling Membership through CRM

I have been playing over the last week and a bit with the newly released Customer Portal Accelerator for Microsoft Dynamics CRM 4.0 in conjunction with the CRM SDK 4.0.12 which contains some new libraries called Advanced Developer Extensions as well as the Portal Development Framework.

In my opinion the Customer Portal Accelerator is a fantastic accelerator and a vast improvement over the previous eService, Events Management and Portal Integration Accelerators (It is now all of these combined).

One of the only drawbacks is that the out of the box accelerator only works with Windows Live Authentication, which is great, but there is definitely quite a few scenarios where this is not ideal.

The accelerator was actually created by the guys at ADXStudio and is essentially a lightweight version of their ADXStudio xRM product, so the simplest way to get other authentication mechanism would be to upgrade to their full ADXStudio xRM product, which I would highly recommend as there are some really fantastic components available.

However if that is not an option then it is actually pretty straight forward to modify the existing Customer Portal Accelerator to use CRM to authenticate the user and I will go through an example of how you could do it in this post.

I am going to assume you have already deployed the “Out of the Box” Customer Portal Accelerator as per the instructions provided in the download.

So you should be starting off with a CRM environment that looks like this :

image

and a Customer Portal site that looks like this :

image

with the sign in screen showing Windows Live ID sign in :

image

 

The great thing is that pretty much everything we need to handle the authentication from the CRM side of things is already there. We can use the fields that are imported by the Customer Portal Accelerator on the Web Authentication Tab of the contact record.

image

The one change I made though was to remove the “Reset Password To” field and put the actual “Password” (adx_password) field onto the form in it’s place.

I then added the following JavaScript code to the Contact_OnLoad event to modify the password field to replace the text characters with a normal password mask so that the password is not visible to users.

//Password Field 

 

var pwd = document.createElement("<input type='password' tabIndex='1911'>");

pwd.value = crmForm.all.adx_password.DataValue;

if (crmForm.all.adx_password.DataValue == null)

{

pwd.value = '';

}

crmForm.all.adx_password_d.appendChild(pwd);

pwd.onkeyup = function()

{

    crmForm.all.adx_password.DataValue = pwd.value;

};

crmForm.all.adx_password.style.display = 'none';

 

You could go a step further and add a plug-in to the Contact Pipeline to encrypt the password, but that is the topic for another post.

image

That’s about it for CRM. The next step is to start modifying the “Customer-Portal-R2” website.

Modify the Web.config file and replace the current <authentication> section with the following :

<authentication mode="Forms">
      <forms name=".ASPXAUTH" loginUrl="login"
       defaultUrl="default.aspx" protection="All" timeout="30" path="/"
       requireSSL="false" slidingExpiration="true"
       cookieless="UseDeviceProfile" domain=""
       enableCrossAppRedirects="false">        
      </forms>
    </authentication>

Comment out the exiting “CrmMembershipProvider” and replace it with the code snippet below.

<!--<membership defaultProvider="CrmMembershipProvider">
        <providers>
            <add name="CrmMembershipProvider" type="Microsoft.Xrm.Portal.Web.Security.LiveIdMembershipProvider" liveIdConnectionStringName="Live"/>
        </providers>
    </membership>-->
<membership defaultProvider="CustomCRMProvider">
  <providers>
    <clear/>
    <add name="CustomCRMProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="Xrm" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/>
  </providers>
</membership>

Modify the Pages/Login.aspx page be replacing the Live Login Control with the standard ASP.Net login control.

<asp:Content ContentPlaceHolderID="ContentBottom" runat="server">
    <%--<crm:LiveIdLoginStatus ID="LiveIdLink" runat="server"
        LoginImageUrl="http://www.passportimages.com/1033/signin.gif"
        LogoutImageUrl="http://www.passportimages.com/1033/signout.gif" />--%>
        <asp:Login
            ID="Login1" runat="server" onauthenticate="Login1_Authenticate">
        </asp:Login>
</asp:Content>

Modify / Replace the code in the Login.aspx.cs page as detailed below :

public partial class Login : System.Web.UI.Page
{

    private XrmDataContext _crmContext;
    private contact _loginContact;
    protected XrmDataContext CrmContext
    {
        get { return _crmContext ?? (_crmContext = new XrmDataContext()); }
    }

    protected contact LoginContact
    {
        get
        {
            return _loginContact ??
                (_loginContact = CrmContext.contacts
                    .FirstOrDefault(c => c.adx_username == Login1.UserName
                        && (c.adx_password == Login1.Password)));
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if ((User != null && User.Identity != null) && User.Identity.IsAuthenticated)
        {
            var redirectUrl = !string.IsNullOrEmpty(Request.QueryString["ReturnUrl"])
                ? Request["ReturnUrl"]
                : !string.IsNullOrEmpty(Request.QueryString["URL"])
                    ? Request["URL"]
                    : "/";

            Response.Redirect(redirectUrl);
        }
        else
        {               
            //var inviteQueryString = string.IsNullOrEmpty(Request["InvitationCode"]) ? string.Empty : "?InvitationCode=" + Request["InvitationCode"];

            //var registrationUrl = SiteContext.Current.Website.GetPageBySiteMarkerName("Live User Registration").GetUrl();

            //LiveIdLink.RegistrationUrl = registrationUrl + inviteQueryString;
        }
    }

    protected void Login1_Authenticate(object sender, System.Web.UI.WebControls.AuthenticateEventArgs e)
    {
        if (LoginContact == null)
        {
            e.Authenticated = false;
        }
        else
        {
            if (LoginContact.adx_username == Login1.UserName)
            {
                if (LoginContact.adx_changepasswordatnextlogon.Value)
                {
                    var page = SiteContext.Current.Website.GetPageBySiteMarkerName("ChangePassword") as Xrm.adx_webpage;
                    string redirectURL = page.GetUrl() + "?UserName=" + Server.UrlEncode(Login1.UserName) + "&Password=" + Server.UrlEncode(Login1.Password);
                    Response.Redirect(redirectURL);
                }
                else
                {
                    LoginContact.adx_lastsuccessfullogon = DateTime.Now.Date;
                    var coreContext = new CoreDataContext();

                    coreContext.UpdateObject(LoginContact);
                    coreContext.SaveChanges();

                    e.Authenticated = true;
                    FormsAuthentication.RedirectFromLoginPage(Login1.UserName, true);
                }
            }
            else
            {
                e.Authenticated = false;
            }
        }

    }
}

Ensure your “using” declarations include the following :

using System;
using System.Linq;
using System.Web;
using System.Web.Profile;
using System.Web.Security;
using Microsoft.Xrm.Portal.Cms;
using Microsoft.Xrm.Portal.Core;
using Microsoft.Xrm.Portal.Web;
using Xrm;

Modify “MasterPages/Default.master” to replace the Live Login Control with an ASP.Net Loginstatus control and comment out the LiveLoginStatus command in the Page_Load event.

<div id="hd-links">
                        <asp:LoginView runat="server">
                            <LoggedInTemplate>
                                <%= SiteContext.Current.CurrentUserContact.GetPropertyValue<string>("fullname") %> &ndash;
                                <asp:HyperLink NavigateUrl='<%$ CrmSiteMap: SiteMarker=Profile, Url %>' Text='<%$ Snippet: Profile Link Text, Manage Account %>' runat="server" /> &ndash;
                            </LoggedInTemplate>
                        </asp:LoginView>
                        <%--<crm:LiveIdLoginStatus ID="LiveLoginStatus" runat="server" />--%>
                        <%--<asp:Login ID="Login1" runat="server">
                        </asp:Login>--%>
                        <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="logout"></asp:LoginStatus>
                    </div>

I then added a Logout.aspx page to the Pages folder, the contents of which is just the following in the .cs file.

using System;
using System.Linq;
using Microsoft.Xrm.Portal.Access;
using Microsoft.Xrm.Portal.Cms;
using Microsoft.Xrm.Portal.Core;
using Microsoft.Xrm.Portal.Web;
using Xrm;
using System.Web.UI.WebControls;
using Site.Library;
using System.Web.Security;

namespace Site.Pages
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            var page = SiteContext.Current.Website.GetPageBySiteMarkerName("Home") as Xrm.adx_webpage;
            Response.Redirect(page.GetUrl());
        }
    }
}

You may have noticed in the updated Login.aspx page that there is reference to a Change Password page, this would allow us to ensure that our users change their password at next logon (a flag that already exists on the Web Authentication tab in CRM). To facilitate this we need to add an additional page called ChangePassword.aspx which should ideally be based on our existing master page to ensure a consistent look and feel. The ChangePassword.aspx page has a standard ASP.Net Change Password control.

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Default.master" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="Site.Pages.ChangePassword" %>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentBottom" runat="server">
<asp:ChangePassword ID="ChangePassword1" runat="server" 
        onchangedpassword="ChangePassword1_ChangedPassword" 
        onchangingpassword="ChangePassword1_ChangingPassword">
</asp:ChangePassword>
</asp:Content>

and the code-behind is as follows :

using System;
using Microsoft.Xrm.Portal.Cms;
using Microsoft.Xrm.Portal.Web;
using System.Linq;
using Xrm;
using System.Web.Security;
using System.Web;
using System.Web.Profile;
using Microsoft.Xrm.Portal.Core;
using System.Web.UI.WebControls;

namespace Site.Pages
{
    public partial class ChangePassword : System.Web.UI.Page
    {
        private XrmDataContext _crmContext;
        private contact _loginContact;
        protected XrmDataContext CrmContext
        {
            get { return _crmContext ?? (_crmContext = new XrmDataContext()); }
        }

        protected contact LoginContact
        {
            get
            {
                return _loginContact ??
                    (_loginContact = CrmContext.contacts
                        .FirstOrDefault(c => c.adx_username == Server.UrlDecode(Request.QueryString["UserName"].ToString())
                            && (c.adx_password == Server.UrlDecode(Request.QueryString["Password"].ToString()))));
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ChangePassword1_ChangedPassword(object sender, EventArgs e)
        {
            
            Response.Redirect("../login");

        }

        protected void ChangePassword1_ChangingPassword(object sender, LoginCancelEventArgs e)
        {
            LoginContact.adx_password = ChangePassword1.NewPassword;
            LoginContact.adx_lastpasswordchange = DateTime.Now.Date;
            LoginContact.adx_changepasswordatnextlogon = false;
            var coreContext = new CoreDataContext();

            coreContext.UpdateObject(LoginContact);
            coreContext.SaveChanges();
            Response.Redirect("login");
        }
    }
}

You may have noticed in some of the code that we are using the same URL rewriting that the Customer Portal Accelerator already uses for our new pages

var page = SiteContext.Current.Website.GetPageBySiteMarkerName("Change Password") as Xrm.adx_webpage;

this will require us to add these pages under the content management section inside CRM in order for the site to work correctly. The 2 pages we need to add are the ChangePassword.aspx and the Logout.aspx page, these pages are added as follows (repeat the below steps for each of the pages)

Create a new Page Template for each of the pages

image

Create a new Web Page for each of the pages

image

Create a new Site Marker for each of the pages

image

Next you can create a contact in CRM, fill in the minimum required fields as well as the Username, Password and Logon Enabled checkbox on the Web Authentication tab. You can also check the “User must change password at next logon” to force that.

You may also want to modify the standard Portal signup workflows that ship with the Customer Portal Accelerator to mimic your environments requirements.

I have attached copies of all the modified files below, including an export of the Customer Portal website from CRM, using the new WebsiteCopy tool

Tool of the week – Episode 1

The Microsoft CRM 4.0 Configuration Data Utility is a tool that I downloaded from MSDN. As with a lot of the tools that I download, getting around to actually playing with them doesn’t always happen as quickly as I would like.
When I finally got around to playing with this tool it definitely has some great potential, both as a Configuration Data migration utility as well as an Import / Export utility for data that you may need to move around or pre-populate into your CRM system for testing purposes during UAT etc, as well as working very well for exporting and importing data from entities that you typically cant access using the Built-In Import capabilities of CRM, like Subjects.

I did however make one small change to the source code of this tool as by default it only allows you to Export and Import data from Custom Entities in the system, so I modified line 206 of ExportDataForm.cs as follows :

Original Code :

 

IEnumerable<EntityMetadata> entities = response.CrmMetadata
.Cast<EntityMetadata>()
.Where(entity => entity.IsIntersect.Value == false && entity.IsImportable.Value entity.IsCustomEntity.Value )
.OrderBy(entity => entity.DisplayName.UserLocLabel.Label)
.ToList();


Altered Code:

IEnumerable<EntityMetadata> entities = response.CrmMetadata
.Cast<EntityMetadata>()
.Where(entity => entity.IsIntersect.Value == false && entity.IsImportable.Value )
//&& entity.IsCustomEntity.Value
.OrderBy(entity => entity.DisplayName.UserLocLabel.Label)
.ToList();

Aside from this the tool is pretty easy to use.

image

You either Export Data to “.Data” files or you Import the “.Data” files back into your system.

Export then requires a Server URL and Organisation name

image

You then get a list of available entities

image

Add the entities you want, select an Output file destination

image

and Presto!!!

The Import process is even simpler.