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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Suggested Answer

Sorting records in subgrid

(0) ShareShare
ReportReport
Posted on by 110

Hi,

 I have a subgrid with columns name, age. I want to do a sorting function for which the conditions are name - descending and start date ascending. Start date field is not in the grid. But it is available in form and a default value is set always. How can I sort based on name and start date. I dont want to display start date in the view. Any suggestions?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    It's possible with CRM customizations. Sorting columns must always be added to the view.

  • Suggested answer
    Nausher Sayeed Profile Picture
    522 on at

    Add name and start date and make it hidden. Use javascript to make hidden.

  • sathish1109 Profile Picture
    110 on at

    Can the fields be hidden from view?

  • Henry J. Profile Picture
    5,237 on at

    No, or else with unsupported JavaScript, and you might suffer from clipping.

    I would advise against it.

    Maybe Nausher is referring to form customization?

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    You can modify the fetchXml of the grid control, and apply sorting or filtering to the fetchXml.

    There are quite a few samples on the web on how to do this, but here is one example:

    blog.navantis.com/dynamically-change-sub-grid-fetchxml-with-a-small-twist-fix

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Doing it on the client side would be unsupported till Microsoft introduces required grid methods. If you wanted a supported customization, you'd probably have to use a retrieve multiple plugin to update that view in pre-retrievemultiple:

    nishantrana.me/.../plugin-on-retrieve-multiple-in-crm-2015

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Shidin Haridas Profile Picture

Shidin Haridas 2

#2
Abdullah13 Profile Picture

Abdullah13 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans