Skip to main content

Notifications

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

how to get the subgrid name when creating the record from Parent

Posted on by 1,017

Hi,

We have the Contact subgrid in the Account entity. 

I would like to get the subgrid name  through javascript, when user is creating the contact record through Account. Please advise the JS 

Thanks!a

  • Suggested answer
    Inogic Profile Picture
    Inogic 24,094 on at
    RE: how to get the subgrid name when creating the record from Parent

    Hi James,

    You have to configure a sub-grid on a form to get the name of the sub grid.

    Under Components, expand Entities, expand the entity you want, and then select Forms. In the list of forms, open the form of type Main. Then on the Insert tab, Insert Sub-Grid.

    Give the unique name to the sub grid as given in the below screenshot:

    Refer to the below JavaScript code to get the name of the sub grid:

    var contactGrid = formContext.getControl("contacts").getGrid();

    var gridName = contactGrid.controlName;

    Hope that helps!

    Thanks

  • Suggested answer
    Ayaka Iwai Profile Picture
    Ayaka Iwai on at
    RE: how to get the subgrid name when creating the record from Parent

    hope this article help you

    social.microsoft.com/.../unable-to-get-the-subgrid-name-using-javascript-in-crm-2011

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: how to get the subgrid name when creating the record from Parent

    Please refer below url's to get subgrid control using js:

    www.crmsoftwareblog.com/.../

    crm365blog.wordpress.com/.../

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans