Skip to main content

Notifications

Dynamics 365 general forum

Get the value of selected data in subgrid

Posted on by 25

I want to use javascript to extract the values of the selected datasets in a subgrid.
could someone help me?

I'm looking forward to your answers.
Reagrds!

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Get the value of selected data in subgrid

    Hi Partner,

    Please check my anwser yesterday,

    in addition, a full code to extract lookup field value and collect them into an dataset array could be below:

    var dataset = [];

    var rows = Xrm.Page.getControl("Sessions").getGrid().getSelectedRows();

    rows.forEach(function (row, i) {

        dataset.push(row.getData().getEntity().attributes.get("msevtmgt_event").getValue()[0].name);

    });

    then call any specific records with dataset[i]; // i is index

    Regards,

    Clofly

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

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