Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Get records from subgrid (Entity 1) to subgrid (Entity 2)

Posted on by Microsoft Employee

Hello, Hope you are doing well

Dear community, I'm looking for a way to get the records of a subgrid of the account entity and add them in the subgrid of the opportunity entity when I fill an account lookup field in the opp

Explained better:

account 1:N partner type

Opportunity 1:N partner type -> Lookup field accountpartnerid

I think the best way is through a JScript but other options are welcome

6574.type.png

Could you please give me any idea, or example.

Thanks in advance

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get records from subgrid (Entity 1) to subgrid (Entity 2)

    Thanks Andrew, Nice Out of the Box feature.

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Get records from subgrid (Entity 1) to subgrid (Entity 2)

    Ivan,

    I would recommend to create a Quick View Form of account and place the grid you shown on the 1-st screenshot to that form.

    On the opportunity form use Quick View control for account lookup and use form you just created.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get records from subgrid (Entity 1) to subgrid (Entity 2)

    Thanks Bipin, I'm not familiar with Web Api code but I think I've been able to investigate and this is the best way. So I'm going to try something, If it's possible could you please give me an idea, or example.

    Thanks a lot

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Get records from subgrid (Entity 1) to subgrid (Entity 2)

    Hi,

    You can write JS on change of Account lookup on Opportunity form.

    Web API Code will fetch all partner type records where Partner Type Account is eq Account on Opportunity form.

    Now loop through each partner type record and create new partner type record and map opportunity lookup.

    You can get the opportunity ID from JS easily.

    If found helpful, Please mark my answer verified.

  • Suggested answer
    RE: Get records from subgrid (Entity 1) to subgrid (Entity 2)

    Hello Ivan,

    I hope you are well and safe.

    Suggest you to use filtered lookup concept:

    carldesouza.com/.../

    Regards,

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

Product updates

Dynamics 365 release plans