Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to have different forms for different types of the same entity. How to achieve the goal.

regards,

Singaravelu S, CFP

*This post is locked for comments

  • sing_ideas Profile Picture
    sing_ideas on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Hi @Chris Dennett,

    Thanks for your reply.

    I will try this method with multiple User Security Roles and Business Process which is mapped to the Account Type (Sub Entity).

    with warm regards,

    Singaravelu S, CFP

  • Verified answer
    C. Dennett Profile Picture
    C. Dennett 330 on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    I think I understand what you mean. You might try this:

    Create a new unmanaged Solution. In your new Solution, add the Existing Account Entity, and create a new Form. Customize the Form to fit ALL of your needs (Proprietorship, Pvt, etc), then try this:

    Hide all fields from view, except one. A custom field that you create that has options of the type of Account that is being created. Then, using Business Rules, show the relevant fields based on the value of the option selected in the dropdown. For example:

    As a user, I click Accounts, then New. I'm presented with a mostly blank page, and a dropdown asking me what type of Account I'm creating. I select "Default" (for example). The OOB Account Form Fields will then show.

    As a user, I click Accounts, then New. I'm presented with a mostly blank page, and a dropdown asking me what type of Account I'm creating. I select "Proprietorship" (for example). The Account Form Fields that are for Proprietorships will show, and the rest will remain hidden.

    Using this method, you should be able to achieve all you are asking. Namely:

    1. You will retain the OOB and native behaviors of Accounts.

    2. You will only show fields relevant to the type of Account indicated in the dropdown.

    3. The Business Rules will apply when editing and viewing the record as well.

    I hope this helps you out! :)

    Best regards,

    Chris Dennett

    Edit to add more detail and proof of concept:

    Here is a quick look at a very very simple custom Account Form using a few OOB fields:

    PvtLtdSelected.JPG

    I named the Form "Test Account Type", and created it as a Main Form.

    Notice I've made a Proprietorship and Pvt Ltd Section. I've made these sections NOT visible by default.

    I then deactivated the current Main Form in my unmanaged solution. That way, users won't have to choose which Form they are working with or viewing. Here is what it looks like when a New Account is being created:

    NewAccountTypeField.JPG

    Notice that the Entity Type is still Account, and the current Form is the Test Account Type Form.

    There are two required fields: Account Name, and Account Type:

    ProprietorshipSelected.JPG

    Here is what the Form looks like with each selected:

    AccountTypeBusinessRule_5F00_1.JPG

    NewMainAccountForm.JPG

    To do this, I created one Business Rule in the Test Account Type Form:

    PvtLtdSelected.JPG

    See at the bottom where it shows the text view of the Rule. Here is the full text of the Rule I wrote quickly to test this:

    IF
        Account Type equals "Proprietorship"
    THEN
        Show field Parent Account
        Show field Main Phone
        Hide field Ticker Symbol
        Hide field Fax
        Hide field Website
    ELSE
        Show field Ticker Symbol
        Show field Fax
        Show field Website
        Hide field Parent Account
        Hide field Main Phone

  • sing_ideas Profile Picture
    sing_ideas on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Hi,

    @chris Dennett

    Thanks for your suggestion.

    Honestly, I don't know what exactly the reporting issue is, when it comes to a custom entity. If there is any thread to understand reporting issues let me know.

    Moreover, the standard entity or OOB entity - Accounts plays important role in D365. Any future new features, need to be kept in mind. 

    Standard Entities have native back-end process and other native integrations, extensions like D365 for Outlook are closely knit, which we don't want to lose.

    If the Account Entity could have multiple levels of classification like sitemap, it would be great to map different business process

    Is that possible to mirror an OOB entity like Accounts, including its relationship with other entities and backend integration?

    I couldn't find a clone option or base entity type while creating a custom entity.

    with warm regards,

    Singaravelu S, CFP

  • C. Dennett Profile Picture
    C. Dennett 330 on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    I'm curious what's stopping you from just creating the 3 custom Entities Proprietorship Account, Partnership Account, and Pvt Ltd Account, setting each up with its unique set of features, and removing the OOB Account from the Ribbon. Then, only those with appropriate permissions will see the appropriate types of Accounts they can create, and each Entity will have all the desired behavior you want.

    Is it just a reporting issue that's making you not want to go this route?

  • ArdantHammer Profile Picture
    ArdantHammer 370 on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    I still think you could go this route and apply different business processes based on the Entity Record Type and use secure fields to hide any data you need hidden (on top of JavaScript hiding the appropriate tabs/fields). Obviously, I don't know your full business needs, but I think this would be the best route even if it is not ideal. Cloning to another entity based on the sub entity type is going to create a headache for reporting and searching. Just some things to think about.

    Additionally if you are set on creating another record based on the record type of the account, I would recommend instead of using a whole new window use a combination of launching a quick create form using javascript for creating the record. And a web resource that looks up to the data entity you are looking for when viewing the form. This would essentially allow you to embed a different form based on the record type. Would be a bit tricky to implement, but I think it might be a little closer to what you are looking for. Might find this thread useful.

    community.dynamics.com/.../125918

    Just some ideas.

  • ashlega Profile Picture
    ashlega 34,477 on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Well, there is not a lot to add to what was already suggested above. You can either use forms/tabs, or you can create a 1:N.. neither of that is exactly what you are looking for.

    With 1:N, you won't be able to "inherit" fields from the "main" entity to the "subtype" entity - those will be completely different entities, one referencing the other.

  • sing_ideas Profile Picture
    sing_ideas on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Hi,

    @John Browne                           

    It is not just about creating a perception of different forms display. Based on the sub-entity or Entity Record Type, the relevant business process, permission sets, security roles needs to be assigned.

    If D365 is not having the feature of Sub Entity type, then I need to create custom entity by duplicating the Standard Account Entity, so that I don't have to loose the native features of the Accounts.

    Your thoughts.

    regards,

    Singaravelu S, CFP

  • sing_ideas Profile Picture
    sing_ideas on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Hi,

    @Alex Shlega

    Thanks for the reply.

    I don't think we will try this method.

    Instead we would wish to create a custom entity because,  we need to associate different business process, permission sets, security to roles depending on the type of records to be added for the entity.

    This objective can be easily achieved by using this sub-entity or Entity-Record-Type or give a suitable name to this feature. Looks like, it is not available in the D365.  

    salesforce.com is having this feature. It is quite useful. In salesforce.com Object = Entity.

    help.salesforce.com/articleView;type=0

    www.salesforcetutorial.com/page-layouts-and-record-types-in-salesforce

    regards,

    Singaravelu S, CFP

  • ArdantHammer Profile Picture
    ArdantHammer 370 on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Have you considered using JavaScript to show and hide tabs based on what account type is selected? This will give the perception of a very different form without having to reload the entire page.

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,477 on at
    RE: How to create Sub Entities for Accounts, Contacts or anyother Custom entity?

    Hi,

     you cannot create subentities for different "subtypes". At most, you can create different forms and put different fields on each of the form. Then you can use javascript to load the right form:

    community.dynamics.com/.../148253

     Just keep in mind it's not going to produce the best user experience - first, your users will see some form.. then javascript will kick in.. and correct form will be loaded

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans