You are currently browsing the tag archive for the ‘Entity Relationships’ tag.

Data Grid “+” does either Add New or Add Existing

So, hypothetical situation, I need a data grid on a custom entity (call it Group) to allow me to add existing related records of Users.

image

Followed the steps as such:

  1. Go to User, add a new lookup field Group, and make it Business Required
  2. Go to the Group custom entity and add a data grid to Users
  3. Save and publish all customizations.

image

Now, the interesting behavior is that, once you navigate to Group, and click on the “+” sign to add a reference to a system user, you get prompted directly to create a new user. But that’s not what I want. I just want to associate an existing user to the Group.

Turns out that it matters a lot how you define the group lookup on the User form. Here’s how it works:

If the lookup to Group is defined as Business Required on the User form, then in the Group form data grid the “+” sign will create a New User record.

On the other hand, if the lookup to Group is defined as either Business Recommended or Not Required, then in the Group form data grid the “+” sign will open up a lookup field, allowing you to reference an existing User.

Just something to keep in mind when working with relationships.

Enjoy!

Advertisements
Microsoft Business Solutions MVP

Check out my course [Video]

Dynamics 365 Customer Engagement Administration

Dynamics 365 Customer Engagement Administration

Check out my course [Video]

Configuring and Extending Dynamics 365 Customer Engagement

Configuring and Extending Dynamics 365 Customer Engagement

Check out my course [Video]

Getting Started with Dynamics 365 Customer Engagement

Reviewed Book

Implementing Microsoft Dynamics 365 for Finance and Operations

Implementing Microsoft Dynamics 365 for Finance and Operations

Reviewed Book

Microsoft Dynamics 365 Extensions Cookbook

Microsoft Dynamics 365 Extensions Cookbook

Check out my Book

Microsoft Dynamics CRM 2016 Customization - Second Edition

Microsoft Dynamics CRM 2016 Customization - Second Edition

Check out my Book

Microsoft Dynamics CRM Customization Essentials

Microsoft Dynamics CRM Customization Essentials

Check out my Book

Microsoft Dynamics CRM 2011 Scripting Cookbook

Microsoft Dynamics CRM 2011 Scripting Cookbook

Reviewed Book

Microsoft Dynamics CRM 2011: Dashboards Cookbook

Microsoft Dynamics CRM 2011: Dashboards Cookbook

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 604 other followers

Follow Dynamics 365 Wizardry on WordPress.com