Primary fields as lookup values
A lookup field enables your users to specify the primary record of a related record. Microsoft Dynamics CRM displays the primary field value of the primary record in the lookup field, but stores the global unique identifier (GUID) of the primary record in the database.

For example, the primary field of the User entity is the Full Name field. When a user is the owner of a record, the system displays the name of the user in the Owner lookup field on the related record, but stores the GUID of the user record in the Owner field in the CRM database.

Primary fields lookup values & Relationship behaviorsPrimary fields lookup values & Relationship behaviors

Relationship behaviors
When you carry out certain actions on a primary record, the related records may also be affected depending on the defined relationship behavior between the two entities.
The important actions are as follows:
Assign: Changing the owner to another user or team
Share: Sharing the record with another user or team
Unshare: Revoking the sharing with another user or team
Reparent: Associating the record with a new parent record, for example, changing the customer of a case
Delete: Deleting the record
Merge: merging two records (for contacts and accounts)
All other actions—such as activating and deactivating the primary record—have no effect on any related records.

There are four relationship behavior types as follows:
Parental: Any action taken on the primary record is also taken on all related records. For example, if you delete the primary record, all the related records are also deleted. In a parental relationship, the primary and related records are often called the parent and child records.
Referential: Any action taken on the primary record does not affect anyrelated records. If you delete the primary record, the link to that record is removed from the related records.
Referential, Restrict Delete: Any action taken on the primary record does not affect any related records and you cannot delete the primary record while it has one or more related records.
Configurable Cascading: You can define whether actions taken on the primary record are cascaded to the related records or not. The available options are as follows:
°° Cascade All: Any action taken on the primary record is also taken on all related records.
°° Cascade Active: Any action taken on the primary record is also taken on all active related records—inactive related records are not affected.
°° Cascade User-Owned: Any action taken on the primary record is also taken on all related records owned by the same user that owns the primary record.
°° Cascade None: Any action taken on the primary record does not affect any related records.
°° Remove Link: This option also only applies to the Delete action and removes the link between the primary record and all related records.
°° Restrict: This option applies only to the Delete action and prevents a primary record being deleted when it has one or more related records.

Example of relationship behaviors in an action
The Opportunity entity has the entity relationships and relationship behaviors as described in the following table:

Primary fields lookup values & Relationship behaviors

Primary fields lookup values & Relationship behaviors

There are some rules and restrictions on entity relationships in Microsoft Dynamics CRM 2011:
• An entity can have multiple relationships with another entity. Each relationship schema name must be unique.
• To avoid system entities being parented by the custom entities, a custom entity should not be the primary entity in a relationship with a related system entity where the relationship behavior is Parental, or where the relationship behavior is Configurable Cascading and one of the options is set to Cascade All, Cascade Active, or Cascade User-Owned.
• To avoid the multi-parental relationships, an entity can only be the related entity in one relationship where the relationship behavior is Parental, or where the relationship behavior is Configurable Cascading and one of the options is set to Cascade All, Cascade Active, or Cascade User-Owned.
• No system entities have a Configurable Cascading entity relationship behavior.
• Where two system entities have a Parental relationship behavior, you can modify the behavior to Configurable Cascading, but not to Referential, Restrict Delete.
• The System relationship behavior is a special behavior type reserved for some system entity relationships and it cannot be modified or used in the custom relationships.
• Changes to the user interface elements of relationships—such as the display name of the lookup field—must be published before they are applied to the system but schema changes—such as the relationship behavior—do not need to be published.

Articles in the course

  1. Security privileges
  2. Custom entity privileges
  3. Delete & Managed properties
  4. Field datatypes
  5. Removing form components
  6. Selecting default view
  7. Selecting chart type
  8. Organization-level auditing tips
  9. Configuring entity-level auditing
  10. Configuring field-level auditing
  11. Campaign responses
  12. Standard security roles
  13. Business units and inherited security roles
  14. Applying security roles to users and teams
  15. create custom security role
  16. Managing teams & create team
  17. Add & Remove users to team
  18. Add teams to user
  19. Assign & Remove security role to team
  20. Share & Unshare records with team
  21. Delete team
  22. Creating and managing users
  23. Disable and Enable User
  24. Reassign user’s records another user
  25. Assign security role to user
  26. How to assign user to team
  27. Types of entity Relationship & Unsupported relationship
  28. 1:N and N:1 and Custom 1:N Relationships
  29. Primary Fields Lookup Values and Relationship Behaviors
  30. Native N:N and Manual N:N Relationship
  31. Self-Referential 1:N and N:N Relationships
  32. Creating and modifying mappings
  33. Requirements for mapping
  34. Creating connection roles
  35. Creating connection
  36. Editing tabs
  37. Editing sections
  38. Editing fields
  39. Editing navigation area
  40. Editing the header and footer
  41. Adding sub-grids
  42. Adding iFrames
  43. Adding web resources
  44. Previewing forms
  45. Advanced Find & Associated view
  46. Lookup & Quick Find view
  47. Creating view & organizing data in view
  48. Adding and maintaining fields in a view
  49. Adding charts to entities
  50. Exporting & importing system and user charts
  51. Configuring organization-level auditing
  52. General System setting
  53. Calendar & Formats & Auditing
  54. E-mail
  55. Marketing & customization
  56. Outlook
  57. Reporting
  58. Goals
  59. CRM for Outlook settings & System Settings
  60. CRM for Outlook Personal Options
  61. Managing the business units
  62. Creating custom entities
  63. Custom entity options & its detail
  64. Customizing entities
  65. Customizing an entity from a grid or form
  66. Showing an entity’s dependencies
  67. Publishing entity & updating entity’s icon
  68. Datatype descriptions
  69. Field properties and its detail
  70. Customizing fields & Advantages of creating & modifying field
  71. Modifying existing fields & Creating custom fields
  72. Field-level security & Enabling it
  73. Method 1: Creating the global option set first
  74. Method 2: Creating the global option set while creating the field
  75. Modifying & Deleting global option set