Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

how to get main form context when using button of subgrid which is present in quickview

(0) ShareShare
ReportReport
Posted on by 35

i have added a quick view which contain a related subgrid in main form. in subgrid there is one button when clicking on the button it is taking formContext of qvick view form not of main form.

for example. in contact table I have created a quickies which contains all the cases related to contact. i have added that quick view in account form.

i have made a custom button on subgrid onclick of that button it should take formContext of account form but it is taking form context of quick view form

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: how to get main form context when using button of subgrid which is present in quickview

    Hi,

    You can use CRM.webapi.retrieverecord to fetch field value from parent Entity.

    docs.microsoft.com/.../retrieverecord

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get main form context when using button of subgrid which is present in quickview

    Hi vishal malav intime,

    If so, there is no way to get the main form context. You could try to use Web API to get the field's value on the table.

  • RE: how to get main form context when using button of subgrid which is present in quickview

    i want to create new record from sub grid in model form format and in that from i want to pass parameter from main form. and yes i am using create button with custom JS

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get main form context when using button of subgrid which is present in quickview

    Hi vishal malav intime,

    Did you create that custom button by Ribbon Workbench and you pass primary control as parameter?  And why do you need to get main formContext, what do you want to do by that?

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans