Skip to main content

Notifications

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

Populate values in quick create form from parent form

Posted on by 594

Hi Community,

I want to retrieve fields from the parent form once a quick create form is opened. I have onLoad script on QC form in which i need to retrieve the underlying parent forms field. What are the possible supported ways of doing it?

I tried using window.parent or DOM element, but still i couldn't access the parent forms elements.

Thanks in advance

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Populate values in quick create form from parent form

    Hi,

    The out of box relationship won't work in your scenario because you are hitting new from a lookup ( and not from a subgrid). Unfortunately in this scenario, I don't think there is any supported way. I will see if I can try this using DOM (window.parent). If yes, will share the details here :)

    For now, you can explore the Goutam's suggestion on the below thread and see if this wok for you.

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/371017/how-to-autofill-quick-create-contact-form-from-main-lead-form/980103#980103

    Hope this helps.

  • chakkay Profile Picture
    chakkay 594 on at
    RE: Populate values in quick create form from parent form

    Thanks Ravi for quick turnback and apologize for incomplete details.

    We have 1:N out of box relationship between contact & opportunity entity right. On opportunity form, we have account & contact lookup fields. Say user filled in account lookup field on opportunity and saved it. Now user clicks contact lookup field and he doesn't find it so clicks on "New Record" button on the contact lookup which opens up contact quick create form. Ideally, the account lookup field on opportunity should map to account field on contact quick create form but it isn't working.

    I tried in brand new vanilla instance, but it is mapping fields as per relationship mapping when you create an opportunity from contact. But when creating contact from opportunity its not mapping it.

    FYI, i also tried using unsupported DOM elements like window.parent/window.top.parent.frames[0], but unfortunately i am not getting any of the parent attributes on UCI. Not sure how to achieve this though?

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Populate values in quick create form from parent form

    Hi,

    There is no supported way to get the fields from the parent record, however if you have some relationship exists then you may be able to use the relationship mapping to populate the fields from parent to child. For example, out of box when you create a contact from an account, the business phone, address details and account name is auto populated from the account record.

    https://dyn365pros.com/2017/05/03/dont-get-caught-mapping-microsoft-dynamics-365-mapping-without-code/

    qcconbtact.png

    If you do not have a parent child relationship then you can go for the unsupported methods of using window/dom object as you mentioned. If these are not working then provide more details (with screenshot) what are you trying to populate, what have you tried and what is not working (including any error or debug info).

    Hope this helps.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans