Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Copy subgrid records

(0) ShareShare
ReportReport
Posted on by 156

Hi everyone,

I have a custom entity A which is a subgrid in Lead, Opportunity, Account.(1:N relationship)

Now, when a lead is qualified, the subgrid from leads should copy to subgrids in Opportunity and Account.

How shall I achieve this? What is the best method of doing it as it can be done in many ways. 

Thanks!

  • Inogic Profile Picture
    Inogic 412 on at
    RE: Copy subgrid records

    Hi Tiara,

    You can achieve your requirement with the help of Click2Clone.

    Click2Clone is a productivity app which enables users to clone/copy records from any OOB as well as custom entities of Dynamics 365 CRM to another record. With Click2Clone, users can easily clone/copy related child records and create multiple copies of any given Dynamics 365 CRM record.

    In your scenario, on qualifying lead, a workflow will trigger and it will clone those records.

    Thanks!

  • Teska.chawla Profile Picture
    Teska.chawla 156 on at
    RE: Copy subgrid records

    Thanks for the detailed explanation. My requirement is to have 1:N relationship subgrid of custom entity A in Leads, opportunities, Accounts. On qualification of lead, the subgrid from lead is copied to subgrids in Opportunity and Account.

    Now, can I have it done via power automate? On update of lead, relate the records?

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Copy subgrid records

    Hi,

    In that case, you need to:

    • Create a 1:N relationship between Opportunity and Custom Entity A.
    • Add a sub-grid on Opportunity of entity A.

    First, I would recommend you to write your requirements and draw an ERD.

    You need to think of the following:

    • Do you need to add Entity A records on Account independent of a Lead or Opportunity?
    • Do you need to add Entity A records on Contact independent of a Lead or Opportunity?
    • Do you need to add Entity A records on Opportunity independent of Lead?

    Based on my assumptions, let me explaining possible outcomes, these may change based on your requirements. 

    If you do not need to add these records for Account and Contact independent of Lead/Opp, the solution is as follows:

    • When starting from Lead:
      • use the quick view form approach to show sub-grid from the lead's quick view form.
      • If you need to change this data independent of lead on the opportunity, then do not create a quick view form. Instead, create a relationship between Opportunity and Entity A (1:N), write a plugin to copy records of Entity A to Opportunity, when it is created from a Lead.
    • When starting from Opportunity:
      • use the Opportunity -> Entity A relationship sub-grid to add the options.
      • Now, this is not easy for Account and Contact, as the relationship between Account/Contact and Opportunity is 1:N (unlike N:1 with lead). So you need to figure out what records you need to show.
  • Teska.chawla Profile Picture
    Teska.chawla 156 on at
    RE: Copy subgrid records

    I tried this approach. I have a doubt. This shows the subgrid only when originating lead has data. But if I want to create an opportunity directly, the subgrid of custom A won't show up

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Copy subgrid records

    It should work fine, give it a try.

    To make it easier for the others, please mark the appropriate answers as verified (click 'Yes' under 'Did this answer your question?').

  • Teska.chawla Profile Picture
    Teska.chawla 156 on at
    RE: Copy subgrid records

    Ok, thanks for this approach. Is there any limitation with using quick view form as subgrid and a normal subgrid?

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Copy subgrid records

    Hi,

    Thank you for your query.

    The best and easiest approach is to use the Quick View form (of Lead entity):

    • Create a Quick View form on the Lead having sub-grid to entity A.
    • Modify Account, Contact, and the Opportunity forms to show this Quick View form for the Lookup Originating Lead.

    Basically, when a lead is qualified, a lookup named Originating Lead in all 3 entities (Account, Contact, and Opportunity) is filled, based on this lookup you can show quick view form of Lead which has a sub-grid of custom entity A, eventually the same sub-grid data will show up.

    Examples:

    (+) Embedding subgrid in related entity using Quick view form - Microsoft Dynamics 365 Community

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans