Search code examples
dynamics-crmdynamics-crm-365

Dynamics CRM Entity to be owned by person or company


I have the below requirement -

We have an entity named Garden. A garden is owned by a person or company, and can also be leased by one or more people or companies. Each garden has a unique number.

Ideally, we would want to be able to see a single grid of all the people that own and/or lease the garden, regardless of whether they are a person or a company.

Questions -

1) Which entity to choose for person -> User or Contact

2) Which entity to choose for company?

3) How to design record ownership or leasing of garden?


Solution

  • This is a broad question, I’ll try my best.

    Fact: We don’t have an option today to create a custom polymorphic entity - to capture/store multiple types of entities. There are some available OOB entities - Customer to store Account/Contact, Owner to store User/Team, Activity Regarding to store any Activity enabled entities.

    If you look at Bookable Resource entity, even MS store the type like User or Equipment & respective lookup records separately. This is what you need exactly. Read more

    1) Which entity to choose for person -> User or Contact

    2) Which entity to choose for company?

    User (owner) in case you need security around the ownership of the records. Then company has to be the Teams, because you mentioned Garden maybe owned by Person or Company. How many records you’re going to manage and are they going to get login in CRM?

    You may have to look at PowerApps (Dynamics) portals which gives B2B, B2C options to control records ownership by Accounts/Contacts.

    3) How to design record ownership or leasing of garden?

    Partially answered in the above points. For leasing, you can have multiple subgrid (1:N) relationship. If required, you may need a custom component or web resource to pull the multiple type of owned/leasing records by UNION the results & render as a grid.