locked
Connections vs 1:1 Entity Relationships RRS feed

  • Question

  • I have a custom entity MyEntity. There are the following properties:

    * Each account, contact and lead CAN (but does not have to) have a 1:1 relationship to this entity.
    * The user does not set/select any relationship. It's all done by the system (plugin/workflow)
    * Data from the MyEntity child must be available in the forms of the Account/Contact/Lead
    * There should be a parent-child relationship
      -> if the Account/Contact/Lead is deleted, the MyEntity child is deleted too
      -> if the Account/Contact/Lead is updated, the MyEntity child is being updated to (through a workflow)
      -> if the Account/Contact/Lead is assigned/shared/etc so will the MyEntity child

    All of this makes me believe I should use an Entity Relationship (except it does not have 1:1). However, are there any advantages to do this with connections instead? If I use connections would I lose some of the above listed required functions?

     

    Saturday, September 10, 2011 3:55 PM

Answers

  • Some of this you won't be able to control with either a Relationship or a Connection; specifically, these requirements:

    * There should be a parent-child relationship
      -> if the Account/Contact/Lead is deleted, the MyEntity child is deleted too
      -> if the Account/Contact/Lead is updated, the MyEntity child is being updated to (through a workflow)
      -> if the Account/Contact/Lead is assigned/shared/etc so will the MyEntity child

    An entity can only have a single parent through a Relationship, and a Connection extends no cascaded actions.  You're straight into "custom programming" territory on that one--with one possible exception:  if "MyEntity" was a custom Activity entity.  You might be able to meet all of your requirements in that scenario with very little work.

    Otherwise, a Connection makes the most sense administratively; but gives you far less control in automation (without extensive development).  Relationships get you closer, but would still require as significant an amount of development as Connections--the only difference being in ease and speed of accomplishment.

    That said, look into whether a custom activity entity will work in this scenario for your purposes.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    Sunday, September 11, 2011 7:58 AM
    Moderator

All replies

  • Hi hfaun,

    There is no 1:1 relationship available but you can use 1:N relationship and restrict more than one records entry by using a plugin.


    Ayaz Ahmad CRM Solutions Architect | http://ayazahmad.wordpress.com
    Saturday, September 10, 2011 4:10 PM
    Moderator
  • Ayaz, thanks. Maybe I was not clear enough. My question was regarding the new Connections introduced in CRM2011. In other words, for the described scenario are Connections more suitable? What are the advantages/disadvantages of Connections over 1:N (used as a 1:1) Entity Relationship for that scenario?
    Saturday, September 10, 2011 6:14 PM
  • Some of this you won't be able to control with either a Relationship or a Connection; specifically, these requirements:

    * There should be a parent-child relationship
      -> if the Account/Contact/Lead is deleted, the MyEntity child is deleted too
      -> if the Account/Contact/Lead is updated, the MyEntity child is being updated to (through a workflow)
      -> if the Account/Contact/Lead is assigned/shared/etc so will the MyEntity child

    An entity can only have a single parent through a Relationship, and a Connection extends no cascaded actions.  You're straight into "custom programming" territory on that one--with one possible exception:  if "MyEntity" was a custom Activity entity.  You might be able to meet all of your requirements in that scenario with very little work.

    Otherwise, a Connection makes the most sense administratively; but gives you far less control in automation (without extensive development).  Relationships get you closer, but would still require as significant an amount of development as Connections--the only difference being in ease and speed of accomplishment.

    That said, look into whether a custom activity entity will work in this scenario for your purposes.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    Sunday, September 11, 2011 7:58 AM
    Moderator