web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to get number of selected records in Subgrid by javascript

(0) ShareShare
ReportReport
Posted on by 28

I have a Sub-Grid which I select 1 or more records from to do some changes on them. I want to get the number of selected records to compare it with the allowed. 

there are some functions work on only 1 record and other functions work on 2 or more functions.

getSelectedRows > gets me the Guid

getTotalRecordCount > gets me the total number of records, not selected once.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi there,

    have a look here, I recently wrote a  blog on this  : passion4dynamics.com/.../get-selected-record-information-from-main-view-or-a-subgrid-in-dynamics-365  

    doing above will give you the Id of the record post which you can perform CRUD operation on that record using web api.

  • Suggested answer
    Sreevalli Profile Picture
    3,264 on at

    Hi,

    var ActiveSelectedRows = Xrm.Page.getControl("Subgrid1_name").getGrid().getSelectedRows().getLength();


    will give the selected records count from the form subgrid

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans