Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Creating relationships with a custom entity

(0) ShareShare
ReportReport
Posted on by 79

Hello,

I've created a custom entity for a special sales program with our company. This new entity should capture events that bring in new leads, opportunities and accounts. This new custom entity also 'manages' everything done under this new sales program through custom system views and goals. I've created a custom entity under activities for other services done under this program too.

In essence I have to link the new entity that captures event info, the new activity entity, accounts, leads, opportunities and goals to the new entity created for this new sales program so I can track progress and records that are affected/created by events and activities entered. It think a good way to explain it is, I am trying to customize the "Campaign" function to my company's needs.

I've created custom fields on Accounts, Leads, Opportunities, to identify them as part of this program. (It's just a simple Yes/No field) And if I can, I will create a business rule that changes to "yes" if an "EVENT" information (per the sales program) is entered in the forms.

With the aforementioned in mind, I'm having a hard time creating relationships so I can link other entities and records to this new sales program. When I first tried, I used N:1 with Accounts and the new entity for the special sales program, and when I tried to test it creating a custom system view, I was not able to use Account records for the view.

Would a D365 ninja please help me? 

  • Suggested answer
    Paul_Owen Profile Picture
    Paul_Owen 2,027 on at
    RE: Creating relationships with a custom entity

    Hi, just add lookup fields to the entities that Lookup to the Parent entity and it will automatically create N:1 relationships.

    Regards

    Paul

  • Suggested answer
    LuHao Profile Picture
    LuHao 40,872 on at
    RE: Creating relationships with a custom entity

    Hi barbieruelas,

    We need to create a 1:N relationship for the Account entity and the new entity.

    Go to the customizations panel, and click the new entity > N:1 relationship, new a relationship, select Primary Entity as Account.

    pastedimage1584596802640v1.png        pastedimage1584596813237v2.png

    After creating a relationship, go to new entity > views, edit a view, click Add Columns, select Record Type as Account, select its fields. Finally publish all customizations.

    pastedimage1584596893956v3.png    pastedimage1584596921229v4.png    pastedimage1584596960606v5.png

  • barbieruelas Profile Picture
    barbieruelas 79 on at
    RE: Creating relationships with a custom entity

    Is there a way to change the new entity in a way a relationship is created and then it can show the Account fields?

    I don't mind re-creating the new entity. Thanks for the help!

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Creating relationships with a custom entity

    Hi barbieruelas,

    If the Account and the new entity are in a N: 1 relationship, then we can only use the fields of the new entity on the Account view.

    Because the parent entity exists on the child record as a lookup field, the child entity view can display the fields of the parent entity by the lookup field.

    In your environment, Account is a child entity, and the new entity is the parent entity, so the fields of the new entity can be displayed in the Account view, but the Account fields cannot be displayed in the view of the new entity.

    If I misunderstood your problem, please correct me.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans