Microsoft CRM Solution Import Fields that are not valid were specified for the entity

While importing a solution to CRM 2011, CRM 2013, or CRM 2015 you receive an error 

Fields that are not valid were specified for the entity

 

The Cause

The cause of this is likely that one of the attributes that you are importing (from a dev environment) already exists in the CRM instance, but with a different attribute.

For Example:

  • In your Live Environment
  • Within Accounts, you create a new attribute called “Friendly Cusomter” and mark it TEXT 
  • Publish and all is well and good.
  • In you Dev Environment
  • Within Accounts, you create a new attribute called “Friendly Customer” and make it a PICK LIST

 

in other words, the same name for the attribute, but a different kind of field.

Then try to export from DEV and import to LIVE. You get the error.

 

The solution

You have to remove the conflicting fields from the destination (live in the example above) CRM system.

Microsoft gives you some help here, in the form of an XML dump file. What you need to do is open that file in something like DreamWeaver that has the ability to apply “Source Formatting”. This makes the file pretty to read. 

From

Ugly XML Dump file from CRM.png

To

CRM xml dump file in DreamWeaver.png

Then do a search for the text “errortext” and start clicking next / next till you get to some text with an attribute and an error message. 

In our case:

Screenshot 2015 04 29 21 52 24

<Cell ss:StyleID=”s137″ name=”ErrorText”>
<Data ss:Type=”String”>Attribute new_leasecustomer is a Picklist, but a Boolean type was specified.</Data>
</Cell>

This gives the name of the attribute at fault.

<Cell ss:StyleID=”s137″ name=”ErrorText”>
<Data ss:Type=”String”>Attribute new_leasecustomer is a Picklist, but a Boolean type was specified.</Data>
</Cell>

And the error on the import will tell you the Entity that it failed the import on. Again in this case it was the ACCOUNT entity.

So we just removed that attribute from any forms and views, then deleted the attribute (be sure that your live data is not relying on data entered here by users as you will loose it). Publish the entity. Then test the import again. 

CRM 2015 2013 find Dependencies for Managed Solution

How to Delete a Managed Solution in CRM 2013 or CRM 2015

Sometimes when you try to delete a managed Solution, there is an error message about the dependancies of the solution being in use.

CRM Cannot Delete Component

When you download the log file, you see some typical Microsoft Crap that really does nothing to help you.

Screenshot 2015 04 12 16 02 08

The only thing it does is to tell you that you can’t delete the component because it is being used in this case by two other components.

Now the hard part is finding the components that are using it.

 

Finding the Referenced Dependencies CRM 2015 Components

1. Work out the Solution Name. Navigate to CRM / Settings / Solutions – and read the exact Name of the Solution to be deleted. In this case it was “ZendeskCRM2011Connector

Deleting CRM Managed Solution

 

2. Login to your CRM Server and open the SQL database that matches the Organisation name being used in CRM.

3. Execute an SQL query against that database that reads.

select
SolutionId
from
Solution
where
UniqueName
=’Name of your Solution

(Replacing the Name of Your Solution) with the exact name of your solution, So in our case:

select
SolutionId
from
Solution
where
UniqueName
=’ZendeskCRM2011Connector’

And it executes to give:

CRM Find GUID for Managed Soltuon

This gives you the GUID of the managed solution in the results area. In our example it is the: 3AC85885-F78B-47A3-BAB5-F8DE569B4EDD number at the bottom.

4. Now navigate to the following URL: 

https://YOUR CRM URL/tools/dependency/dependencyviewdialog.aspx?objectid=GUID&objecttype=7100&operationtype=dependenciesforuninstall

 

Replacing the “YOUR CRM URL” with the URL to your own CRM system.  and replace the GUID with the GUID retrieved from step 3 above. Thus the URL may look like this: 

https://crm.iwebscrm15.com:444/tools/dependency/dependencyviewdialog.aspx?objectid=3AC85885-F78B-47A3-BAB5-F8DE569B4EDD&objecttype=7100&operationtype=dependenciesforuninstall

 

It will show a page that looks like this: 

Show Solution Dependencies CRM 2015

 

Which you can use to help you work out what to edit to remove the dependencies and delete the solution.

Thanks Microsoft for making something so easy so hard!

 

 

Setting up CRM 2015 on Windows 2012 R2 and SQL 2014 Stand Alone

Setting up CRM 2015 on a New Virtual Windows 2012 R2 with SQL 2014

Install the Following Components

  • Services
  1. Indexing Service (Windows Search Service
  2. IIS Admin
  3. World Wide Web Publishing
  • Windows Data Access Components MDAC 6.0
  • Microsoft ASP.NET

 

Windows Search Service

The following method is use to install the Windows Search Service on Windows 2012 R2. The search feature is launched form the Server Manger (which will start by default as login as an administrator).

Click Add Roles and Features

Windows 2012 Add Roles and Features

 

Next

Screenshot 2015 03 22 16 15 03

 

Next

Screenshot 2015 03 22 16 15 42

 

Next

Screenshot 2015 03 22 16 16 41

 

Next (without selecting anything)

Screenshot 2015 03 22 16 17 44

 

With the Features, select Windows Search ServiceNext

Screenshot 2015 03 22 16 19 46

 

Select Install

Windows Search Service Feature

 

Select Close

Screenshot 2015 03 22 16 22 15

 

Run through the process again 

Click Add Roles and Features

Windows 2012 Add Roles and Features

 

Next

Screenshot 2015 03 22 16 15 03

 

Next

Screenshot 2015 03 22 16 15 42

 

Next

Screenshot 2015 03 22 16 16 41

 

Next (without selecting anything)

Screenshot 2015 03 22 16 17 44

 

This time select the Web Server (IIS)

Screenshot 2015 03 23 18 09 39

When prompted select Add Features

Screenshot 2015 03 23 18 08 42

Select Next

Screenshot 2015 03 23 18 13 00

Next

Screenshot 2015 03 23 18 13 15

Next

Screenshot 2015 03 23 18 13 19

Next

Screenshot 2015 03 23 18 13 36

Close

 

Installing SQL Server

When installing the SQL server, the required features are almost the default features with the following two ticks.

1. Database Engine Service

2. Full-Text and Semantic Extractions for Search

 CRM 2013 SQL 2012 Requirements

 

Additional IIS Feature to Add for IIS

CRM will work much better with IIS Dynamic Compression. The install this you follow the normal Roles and Features install, and find the section for:

Web Server Role (IIS)

Second option: Under Server Manager click Add roles and features       

  • Click Next for Role-based or featured-based installation       
  • Select Server Roles       
  • Expand Web Server (IIS) role     
  •  Under Performance check the option for Dynamic Content Compression

IIS Dynamic Compression Feature

Click Next

This ensures that you can enable dynamic compression after install to ensure that performance is best.

 

 

 

 

 

 

CRM 2015 Extend Auto Logout Time in IFD

CRM 2015 and CRM 2016 IFD will Automatically Logout the user with a Message:

Your session in Microsoft Dynamics CRM is about to expire. To continue working, you must sin in again.

CRM 2015 Auto Logout

By Default this setting is 60 minutes, and the message will pop up around 20 minutes before logout.

Any unsaved changes will be lost as your session ends.

 

The Fix

To extend the automatic logout time in CRM 2015, we must extend the time set in ADFS 3.0 using the PowerShell command. First we need to know the name that was used to set up the Relying Party Trust in ADFS.

1. Open Server Manager and from the Tools menu select ADFS Management

ADFS Management

2. in AD FS management, open Relying Party Trusts and find the Display name for the CRM IFD Relying Party Trust

Screenshot 2015 04 03 17 30 58

In this case, we have called the Relying Party Trust – “CRM IFD Relying Party” as we keep things simple when we create things. Using the exact name for the title of the trust as we created it. But really it could be anything. One distinguishing feature is that the URL identifier is going to be optioning to the URL that displays in the browser window when you are in the process of login into your IFD CRM.

3. Start PowerShell

Screenshot 2015 04 03 17 35 57

4.  Check you have the correct name of the Relying Party Trust by typing the following command.

Get-ADFSRelyingPartyTrust -Name "relying_party"

Where you replace the “relying_party” with the name you identified in Step 2 above. In our case the command will be: 

Get-ADFSRelyingPartyTrust -Name “CRM IFD Relying Party

 

The result should look something like this if you get it correct.

Screenshot 2015 04 03 17 40 02

5. Not type the command to set the time you want to set for Auto Logout.

Set-ADFSRelyingPartyTrust -Targetname “CRM IFD Relying Party“ -TokenLifetime 720

(Again replacing the “CRM IFD Relying Party” with the name used on your system.)

Note: The 720 is time in minutes. 12 Hours in this case. You can change the value up and down as liked.

Set-ADFSRelyingPartyTrust -Targetname “CRM IFD Relying Party“ -TokenLifetime 720

Screenshot 2015 04 03 17 43 47

6. Close out the PowerShell and you are done.

SQL 2014 ‘Agent XPs’ componet is turned off when accessing Maintenance Plans

When trying to create a Maintenance Plan you get an error: 

‘Agent XPs’ component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Agent XPs’ by using sp_configure. For more information about enabling ‘Agent XPs’ see “Surface Area Configuration” in SQL Server Books Online. (Object Explorer)

Screenshot 2015 04 01 14 39 39

Details of the error are:

===================================

Cannot show requested dialog.

===================================

Unable to execute requested command.

——————————
Program Location:

at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolMenuItemHelper.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()

===================================

‘Agent XPs’ component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Agent XPs’ by using sp_configure. For more information about enabling ‘Agent XPs’, see “Surface Area Configuration” in SQL Server Books Online. (Microsoft.SqlServer.Management.MaintenancePlanWizard)

——————————
Program Location:

at Microsoft.SqlServer.Management.MaintenancePlanWizard.MaintenancePlanWizardForm.LoadData()
at Microsoft.SqlServer.Management.MaintenancePlanWizard.MaintenancePlanWizardForm..ctor(XmlDocument doc, IServiceProvider serviceProvider)

 

The Cause

This is caused because the “SQL Server Agent” is not running.

By default, this service is set to start manually. This is normal after a fresh install.

 

The Solution

1. Open SQL Server Configuration Manager

2. Start the service for SQL Server Agent.

SQL Server Agent

3. Right click the service and select Properties

Screenshot 2015 04 01 14 43 29

4. Click the Service tab and change the start mode to Automatic

Screenshot 2015 04 01 14 43 48

That’s it!