Fixed – The given key was not present in the dictionary error while using FormattedValues in LINQ in CRM 2013.


Hi,

I was getting the following exception while trying to get the text for an option set field named area of law in linq.

The query with joins


var authorization = (from a in
SDKHelper.XrmServiceContext.lss_AuthorizationSet 
join c in SDKHelper.XrmServiceContext.lss_contractSet on a.lss_ContractId.Id equals c.Id

join l in

SDKHelper.XrmServiceContext.lss_lawyerSet on c.lss_LawyerId.Id equals l.Id

where a.lss_AuthID == authorizationId

select
new
Authorization
{

AreaOfLawAndContractType = c.lss_Area_of_Law != null? c.FormattedValues[“lss_area_of_law”] : default(string)

}).FirstOrDefault();

return authorization;

 

The fix was instead of using FormattedValues collection of related entity in join, we need to use the FormattedValues collection of the primary entity.

 

var authorization = (from a in
SDKHelper.XrmServiceContext.lss_AuthorizationSet

join c in
SDKHelper.XrmServiceContext.lss_contractSet on a.lss_ContractId.Id equals c.Id

join l in
SDKHelper.XrmServiceContext.lss_lawyerSet on c.lss_LawyerId.Id equals l.Id

where a.lss_AuthID == authorizationId

select
new
Authorization

{

AreaOfLawAndContractType = c.lss_Area_of_Law != null? a.FormattedValues[“lss_area_of_law”] : default(string)

}).FirstOrDefault();


return authorization;

 

Hope it helps.

Missing Activities and Closed Activities navigation bar item on Form during customization.


Hi,

Recently we had to reorder the navigation link that appears for one of our entities form. Basically we wanted Activities and Closed Activities to be the last one there in the left navigation pane.

However while opening our form for customization, the links for the activities were missing.

This blog post came to our rescue

http://blog.customereffective.com/blog/2011/09/how-to-get-the-microsoft-crm-closed-activities-nav-bar-link-back-if-you-delete-it.html

Hope it helps.

CRM 2013 – The Upgraded Metadata Browser


CRM 2013 – The Upgraded Metadata Browser

salimadamon's avatarSalim Adamon - Dynamics 365 Blog

I was playing around the new CRM 2013 SDK and thought I’d spend some time one the revamped metadata browser. Like in the CRM 2011 SDK, the Metadata browser is provided as a Managed Solution located in the folder “Your SDK FolderToolsMetadataBrowser”

Once you’ve installed the solution in your CRM application, you have to open it in order to get the links to the Metadata web resources in the configuration page.

The Metadata Browser now has two pages:

  • Metadata Browser (displays a master/detail view of all the entities in the system)
  • Entity Metadata Browser (displays details about a selected entity)

The key features of the tools are highlighted in the configuration page (see copy below). It is extremely helpful for developers, lightweight built on HTML/JavaScript and has a lot of nice features (details below). So if were looking for an alternative to the popular Silverlight Metadata browser built…

View original post 227 more words

System.Exception: Action Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction failed. —> System.Data.SqlClient.SqlException: Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.


 

Got this error while installing CRM 2013.

Following post helped in fixing the issue.

http://stackoverflow.com/questions/15488922/connection-to-sql-server-works-sometimes

https://community.dynamics.com/crm/f/117/t/115384.aspx

Hope it helps.

“Could not open a connection to SQL Server” error while installing CRM 2011 Server


Faced the same issue while installing CRM 2013.

Rajeev Pentyala's avatarRajeev Pentyala – Technical Blog on Power Platform, Azure and AI

Hi,

You may come across below exception while installing CRM 2011 Server.

“Named Pipes Provider, error: 40 – Could not open a connection to SQL Server “

Scenario :-

  • You have a standalone machine “VM 1”, with SQL Server 2008  application
  • You have another machine “VM 2”, where you are trying to install “CRM Server” by pointing to the SQL Server on “VM 1”
  • Installation wizard throws the “Could not connect to….” exception in the midway

Reason :-

  • Remote connection was not enabled on SQL Server machine

Fix :-

  • Connect to the machine where SQL Server 2008  installed
  • Open the “Sql Server Configuration Manager” (i.e.,  Start –> All Programs –> Microsoft SQL Server 2008 R2 –> Configuration Tools)
  • Enable “Named Pipes” protocol (Refer below screen)

Enable "Named Pipes" protocol

  • Restart the “MSSQLSERVER” service (Go to “Run -> Services.msc”)

Restart "MSSQLSERVER" service

  • Resume the installation.

Hope it helps 🙂

View original post

“Save and New” button in CRM 2013.


After upgrading the existing CRM 2011 solution to CRM 2013 we found out that Save and New button is missing while creating related child records.

The way we got it back was to open the solution in Ribbon Workbench and Customizing the command for Save and New button.

 

And removing the Mscrm.HideOnCommandBar rule.

 

 

Hope it helps.