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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Can we sort record using RetrieveMultipleRecords

(0) ShareShare
ReportReport
Posted on by

Good day,

By using RetrieveMultileRecords function in Javascript, can we sort the record first and get the top 5 or 10  and specify ascending or descending ?

Regards,,

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, 

    Yes, it is feasible. Please refer to the example below: 

    Xrm.WebApi.retrieveMultipleRecords('contact', "?$orderby=emailaddress1 asc&$top=10").then(
        function success(result) {
            console.log(result)
        },
        function (error) {
            console.log(error.message);
            // handle error conditions
        }
    );

    This example allows you to search for the first 10 contacts by applying an order to their email address in an ascending way.

    pastedimage1632993242548v1.png

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, any news ?

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 163 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 158

#3
Zhilan Profile Picture

Zhilan 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans