web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / xRMCenter / Working with Relates Entities

Working with Relates Entities

nghieppham Profile Picture nghieppham 4,753

Performance is very important to software world, specially for LoB Application. Sometimes many MS CRM systems is struggle with performance.  In fact, there are many elements effected to performance of CRM system.

  • Network Infrastructure
  • Database
  • Code optimization 

In this article will talk about the Relate Entities, new feature has been supported by MS CRM SDK from 2013 version, it help developers to reduce connection to CRM server and optimize performance for working with CRM.

What is benefit of RELATE ENTITIES?

  • Reduce trips to and from CRM Server.
  • Records are created as part as of a transaction.
  • For Update/Create to work they must be “related” records not arbitrary data.
  • Related entities collection can be used with Create, Update and Retrieve operations via Related Entities query

How to work with RELATE ENTITIES?

Creating record with Relate entity

For example, your system require that when new account was created, it will create several tasks for this account. Of course, this is basic task and maybe we no need to code, but let consider about how traditional code?

Option 1:

  1. Create task by task
  2. Associate task with account

Option 2: 

  1. Created task to collection
  2. Execute multiple request to create data

Let’s see how Relate entity carry out this task

AccountRelate.png

Retrieve Data with Relate entity

Available options:

  1. Using fetchXml
  2. Execute RetrieveMultiple request
  3. Using LinQtoSQ

Let’s see how to get data with Relates entities .

AccountGettingData

That is new support from crm 2013 version. It help me for optimizing performance of integration process.

Hope that it will be useful for someone.


Comments

*This post is locked for comments