Monday, September 22, 2014

CRM Plugin Deployment Error From Visual Studio

When I tried to deploy the plugin dll from the tool deploy feature I got the following error.

Error      138         Error registering plugins and/or workflows. The resource string "ErrorSerializingRegFile" for the "RegisterPlugin" task cannot be found. Confirm that the resource name "ErrorSerializingRegFile" is correctly spelled, and the resource exists in the task's assembly.  C:\Program Files (x86)\MSBuild\Microsoft\CRM\Microsoft.CrmDeveloperTools.12.targets             176        

When checked in google I was able to find the resolution and it was because RegisterFile.crmregister has not been checked out. When trying to deploy it is writing to this file and since it has not been checked out it is giving an error.


This article talks about it

Monday, September 15, 2014

Full name field format on Contact entity

This is a question most of the people do have when it comes to the full name field. There are questions like can the first name, middle name and last name be taken together to form this.
Most of the people try to write a custom plugin to do this, but have issues.

If this is the case is there a way we can achieve this using OOTB functionality?

The answer is Yes. You can do this by changing a value from the system settings.
How to do this?

Go to Settings in CRM and choose Administration and click on System Settings.
From the General Tan Select the full name format you need from the drop down below.



Tuesday, September 9, 2014

Odata Query to Retrieve Information from a self-reference Query

Using the expand term with CRM 2011 and 2013 Odata queries we can bring the related entities required field values. There is a limitation for 6 relationships.

E.x: -
If you want to retrieve the parent contact name when retrieving the accounts then you can easily use this.

https://localhost/OrgName/XRMServices/2011/OrganizationData.svc/AccountSet?$select=AccountId,AccountNumber,Name,Address1_Composite,Telephone1,EMailAddress1,account_primary_contact/FullName&$expand=account_primary_contact

However if you want to retrieve information from a self-reference this method would not work. Microsoft has mentioned this in the below link.


The conceptual schema definition language (CSDL)  element includes all the 1:N, and N:N relationships for the entity. If the relationship represents a self-referencing relationship, there will be two  elements for this relationship. The name of the relationship uses the prefix Referenced and Referencing to differentiate the role a specific record plays in the relationship. For more information, see Types of Entity Relationships.

An example of how this can achieved is given below. This has been written to the default account self reference.


https://localhost/OrgName/XRMServices/2011/OrganizationData.svc/AccountSet?$select=AccountId,AccountNumber,Name,Address1_Composite,Telephone1,EMailAddress1,Referencingaccount_parent_account/Name&$expand=Referencingaccount_parent_account

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...