Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

(0) ShareShare
ReportReport
Posted on by 1,530

I am using Typescript and have install the  npm install @types/xrm --save-dev.  Everything seems to be working.

I did my first deploy.   I am getting the following error message on Xrm.WebApi.retrieveMultipleRecords.  Any ideal on what I did wrong.  Do I need to deploy something else.

 

RetreiveMultError.PNG

 

function start() {
    var mydataset = "?$select=new_datatrackingId,new_objectid,OwnerId,new_userid,new_source,new_name,new_customerid";
    mydataset += ",new_udf1,new_udf2,new_udf3,new_udf4,new_udf5,new_udf6,new_udf7,new_udf8,new_udf9,new_udf10,new_udf11,new_udf12,new_udf13,new_udf14,new_udf15,new_udf16&";
    var filter = "$filter=";
    filter += "(CreatedBy/Id eq guid'" + userId + "' ";
    filter += "and new_source eq 'Incident' and statecode/Value eq 0)";
    var options = mydataset + filter;

    Xrm.WebApi.retrieveMultipleRecords("new_datatracking", options).then(
        startCallBack,
        function (error) {
            alert("Error: " + error.message);
        }
    );
}



function startCallBack(results) {
    var audit = results[0];
    $("#iModel").val(audit.new_udf1);
    $("#iCompleteOn").val('');

    $("#iProduct").val(audit.new_udf3);
    $("#iProjectNo").val(audit.new_udf4);
    $("#iAudit").val(audit.new_udf5);

    $("#iULENo").val(audit.new_name);
    $("#iTechnician").val(audit.new_udf6);
    $("#iFileNo").val(audit.new_udf8)
    $("#iSamples").val(audit.new_udf15);
    $("#iEngineer").val(audit.new_udf7);
    $("#iSamplesReceived").val(audit.new_udf10);
    $("#iTechnicianName").val(audit.new_udf13);
    $("#iEngineerName").val(audit.new_udf14);

    $("#form_caseid").val(audit.new_objectid);
}


7776.solution.PNG

*This post is locked for comments

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    Decided to go with CRMRESETBuilder.  Does work better with my CRM version.

    I also install this APi for Typescript

    Typescript.PNG

  • gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    Hi,

    Please verify the answers which helps you in the subject mention questions.

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    I decided to go with this Nuget.  Seems to work great with CRM 2016.

    5621.Xrm.PNG

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    Has anyone does anything using this link with Typescript.

    Also, has anyone tried this api

    0247.TypeScript.DefinitelyTyped.PNG

    Or

    0247.TypeScript.DefinitelyTyped.PNG

  • Mohsin Ali Profile Picture
    Mohsin Ali 3,614 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    It will not work then. For 2016 you can consider following post:

    community.dynamics.com/.../ms-crm-2016-web-api-operations-retrieve-single-or-multiple-records

  • Verified answer
    gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    You are using old version you can not use this , you can use CRMRestBuilder to make your query instead of Xrm.WebApi

    github.com/.../CRMRESTBuilder

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    I'm using

    Microsoft Dynamics® CRM 2016

    (8.1.0.359) (DB 8.1.0.359)

    Are there any API for CRM 2016?  I through this would work with 2016.

  • Mohsin Ali Profile Picture
    Mohsin Ali 3,614 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    Hi rthompson, please check your version, Xrm.WebApi.retrieveMultipleRecords is applicable to 9.x only.

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    I'm using

    Microsoft Dynamics® CRM 2016

    (8.1.0.359) (DB 8.1.0.359)

    Are there any API for CRM 2016?  I through this would work with 2016.

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Typescript using Xrm.WebApi.retrieveMultipleRecords getting error message

    Hi ,

    Which version of dynamics CRM you are using ?

    Please note Xrm.WebApi.retrieveMultipleRecords method released in 9.x version.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans