Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Retrieve related entity records by selecting optionset value of main entity by using Plugin.

Posted on by Microsoft Employee

There is 1:N relationship with my Main entity to related entity. On the form when I will select "knowledge Level" i.e. option set from Knowledge(main) entity based on the level, benefits from "Knowledge Benefits" entity would display on the form. I want to implement this by using a plugin for CRM online.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retrieve related entity records by selecting optionset value of main entity by using Plugin.

    Yes, you are right. I am using the plugin because I want to create records in the backend based on a particular selection.

    by selecting any value from options set all the related entity data will get populate in subgrid and one record will get created in the 3rd entity. which will store account id, Knowledge level, and respective knowledge benefits.

    Current plugin is doing the same, but in that case, we were using one entity records and referring via lookup. here, I want to use options set instead of entity records.

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Retrieve related entity records by selecting optionset value of main entity by using Plugin.

    I am not sure your question is entirely clear in that case.

    Plugins work for Server Side. JavaScript for Client side.

    If you want to display records in subgrid that is client side.

    If you want to create records in the backend based on a particular selection, that can be back-end code using Actions/Plugins/Workflows/etc...

    Can you please provide a detailed explanation of what exactly you are trying to accomplish and what the plugin that you are trying to replace does?

    Thanks.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retrieve related entity records by selecting optionset value of main entity by using Plugin.

    I have to make changes in existing plugin which was developed by someone else. Its functionality is on selection of entity record you will get all the records from related entity. But, now instead of using entity record, requirement is to select value from option set and then populated related records for same. 

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Retrieve related entity records by selecting optionset value of main entity by using Plugin.

    One other option that you have is create the Knowledge Benefits subgrid in a separate tab, and hide + collapse the tab (default setting).

    When the user selects Knowledge from the option set, make the tab visible and expand it, which will show the knowledge benefits subgrid (on-demand).

    This would probably be the easiest solution with the least amount of code.

    Hope this helps.

  • Suggested answer
    RE: Retrieve related entity records by selecting optionset value of main entity by using Plugin.

    From what I can gather, it sounds like you are trying to filter a subgrid? This would be done by javascript rather than plugin but, as per this question, is not supported.

    community.dynamics.com/.../261438

    The link contains details to the unsupported way if you wish to go that route.

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans