141 Saturday, May 21, 2016 |
Suresh Maurya
Dynamics CRM Consultant at IBM

Disassociate Records in Dynamics CRM - Late Bound

Following example demonstrates how to disassociate record in dynamics crm

public static void DisassociateContactsToAccount(EntityReference contact, EntityReference account, IOrganizationService service) {

// Creating EntityReferenceCollection for the Contact
EntityReferenceCollection relatedEntities = new EntityReferenceCollection();

// Add the related entity contact
relatedEntities.Add(contact);

// Add the Account Contact relationship schema name
Relationship relationship = new Relationship("contact_customer_accounts");

// Disassociate the contact record to Account
service.Disassociate(account.LogicalName, account.Id, relationship, relatedEntities);

}

Connect To Microsoft Dynamics CRM Using Organization Service

Simplest way of connecting to Microsoft Dynamics CRM is using OrganizationService.

OrganizationService constructor can take connection string or CrmConnection object as parameter.

public OrganizationService(string connectionStringName);
public OrganizationService(CrmConnection connection);

Method 1

Pass the connection string name to constructor.

IOrganizationService service = new OrganizationService("connection");

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

service.Create(entity); 

Method 2

In CrmConnection constructor pass the connection string name, which further should be passed in OrganizationService constructor.

CrmConnection connection = new CrmConnection("connection");
IOrganizationService service = new OrganizationService(connection); //System.configuration

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

service.Create(entity); 

CrmConnection requires following additional assembly to be referenced.

System.configuration 

Method 3

Use CrmConnection.Parse method to create CrmConnection object and pass that to OrganizationService constructor.

string connString="Url=http://crm.contoso.com/xrmContoso; Domain=CONTOSO; Username=jsmith; Password=passcode;";

CrmConnection connection = CrmConnection.Parse(connString);
IOrganizationService service = new OrganizationService(connection); //System.configuration

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

service.Create(entity);

Connection String Examples

Using integrated on-premises authentication.

Url=http://crm.contoso.com/xrmContoso;

Using Active Directory authentication. 

Url=http://crm.contoso.com/xrmContoso; Domain=CONTOSO; Username=jsmith; Password=passcode

Using Microsoft account to connect to Microsoft Dynamics CRM Online.

Url=https://contoso.crm.dynamics.com; Username=jsmith@live-int.com; Password=passcode; DeviceID=contoso-ba9f6b7b2e6d; DevicePassword=passcode

Using Microsoft Online Services to connect to Microsoft Dynamics CRM Online.

Url=https://contoso.crm.dynamics.com; Username=jsmith@contoso.onmicrosoft.com; Password=passcode; 

MS CRM Many-to-Many Relationships of the "Native" Kind : CRM 4

Update a Parent from a Child Record with a Dynamics CRM 2011 Workflow

Rather than make your users open multiple forms to update information, you can use Dynamics CRM 2011 workflows to update information on parent records from a child form. Here's how to do it.

Order Management

When customers confirm requests for the product or service, a sales representative can then create an order.

Dynamics CRM: The Linc Group

The Linc Group is a worldwide building services group that is using a full stack of Microsoft software including Microsoft Dynamics CRM to help their sales and field service teams.

Microsoft Dynamics CRM 2013 Customization New Features - Quick Forms

Dynamics CRM 2011 - Connected Cloud Demo.wmv

In this demonstration of a real estate scenario, you'll see how Microsoft Online Services, including Microsoft Dynamics® CRM Online, Microsoft® Office 365, and Windows Azure,® provide a connected experience that leverages the power of the cloud.
 

 

Simplify case resolution with the Dynamics CRM interactive service hub

Pull customer information from one central place to resolve cases quickly with the Dynamics CRM interactive service hub. This video provides an overview of the interactive service hub, and shows how you'll spend less time looking for the information you need to resolve customer issues, and more time focusing on your customers.

Microsoft Dynamics CRM 2013 for Tablets - Customizations

CRM 2013 Quick Tip: Add new information quickly through shortcuts in Microsoft Dynamics CRM

Color Grid for Dynamics 365

Color Form for Dynamics 365