Quantcast
Channel: C# – Microsoft Dynamics CRM Blog
Browsing latest articles
Browse All 14 View Live

Assign a record to a Team using C# in Dynamics CRM 2011

Here is sample C# code how to assign a record to a team. //Assign a record to a team private void AssignRecord(Entity TargetEntity, Guid TargetRecordID, Guid OwningTeamID, IOrganizationService...

View Article


Share records using C# in Dynamics CRM 2011

These examples shows how to grant/modify/revoke access privileges for a record with team. //Share a record Read,Write and Append privileges with Team private void SharePrivileges(string...

View Article


‘Entity role must be specified for reflexive relationship’ exception in...

This exception comes when you are trying to associate a record (account) to another record (account) having N:N relationship using C#. In my case account can have multiple payer accounts, got this...

View Article

Merge accounts using C# in Dynamics CRM 2011

When merging two records, you specify one record as the master record, and Microsoft Dynamics CRM treats the other record as the child record or subordinate record. It will deactivate the child record...

View Article

Associate and Disassociate Many to Many relationship records using C# in...

If we have any N:N(Many to Many) relationship in Microsoft Dynamics CRM 2011, need to manually assign relationship between two entities using SDK. This example explains how to associate and...

View Article


Activate/Deactivate a record using C# in Dynamics CRM 2011

In Dynamics CRM 2011 every entity has its own StateCode and StatusCode values. Below example code works with Account and Contact entities. For other entities check entity metadata for Statecode and...

View Article

Get fetch XML link-entity attributes using C# in Dynamics CRM 2011

Following example code shows how to get Account Primary Contact details using fetch XML link-entity Note: Specify ‘alias’ name different than ‘attributename’ and use same alias name in...

View Article

Use NoLock and Distinct in Fetch XML and QueryExpression using C# in Dynamics...

NoLock: It indicates that no database locks are issued against the data that would prohibit other transactions from modifying the data in the records returned from the query. Distinct:  It indicates...

View Article


Fetch XML and ConditionExpression operators using C# in Dynamics CRM 2011

Following table describes different types of operators we can use in a ConditionExpression and Fetch XML in Dynamics CRM 2011 ConditionOperator FetchXML Operator Description BeginsWith like The string...

View Article


Use ExecuteMultipleRequest for bulk Create/Update/Delete using C# in Dynamics...

Using this we can create/update/delete bunch of records at a time. It avoids calling OrgService.Create or Update or Delete every time. This has been added to the Microsoft Dynamics CRM 2011 Update...

View Article

Image may be NSFW.
Clik here to view.

Merge warning: sub-entity might lose parenting in Dynamics CRM 2011

Problem: If you are trying to merge two accounts, If master account record does not have a parent account, but the subordinate account record does, then you will get following warning message if you do...

View Article

Image may be NSFW.
Clik here to view.

There are still open activities associated with this case, when...

Problem: When you try to resolve a case in Dynamics CRM 2011, which has open activities of Task, E-mail, Phone Call, Letter, Fax, Appointment and Service Activity you will get following error message...

View Article

Re-assign Account/User territory in Dynamics CRM 2011

Unfortunately Dynamics CRM 2011 does not support deactivating Territory, If you get a situation where you want to delete the existing territory, you need to first check if it is associated to any...

View Article


Call External Cross Domain REST API/SOAP Service from CRM Plugins/Custom...

In Dynamics 365, if you have any requirement to call cross domain REST API/SOAP UI, we can’t directly call from JavaScript, we need to create a custom workflow and create CRM action on top of it. These...

View Article
Browsing latest articles
Browse All 14 View Live