Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Facing issue with Xrm.WebApi.retrieveMultipleRecords request

$
0
0

Hi Team,

We are working to retrieve records using Xrm.Web.retrieveMultipleRecords request with the help of fetchxml but the result doesn't return nextLink value to get the set of records of the next page. We are facing this issues with only the fetchxml, as its working properly with Odata Query. Here’s the code:

 

function retrieveAllRecords() {

    var accountFetch = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +

  "<entity name='account'>" +

    "<attribute name='name' />" +

    "<attribute name='primarycontactid' />" +

    "<attribute name='telephone1' />" +

    "<attribute name='accountid' />" +

    "<order attribute='name' descending='false' />" +

  "</entity>" +

"</fetch>";

 

    accountFetch = "?fetchXml=" + encodeURIComponent(accountFetch);

 

    Xrm.WebApi.retrieveMultipleRecords("account", accountFetch).then(

    function success(result) {

        if (result.nextLink != undefined) {

            Xrm.Utility.alertDialog("page found");

        } else {

            Xrm.Utility.alertDialog("page not found");

        }

    },

    function (error) {

        Xrm.Utility.alertDialog(error.message);

    });

}

 

Could anyone please let us know if there any issue with fetchxml or it a limitation of WebApi.

Thanks,

Vikas


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images