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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Rest Kit not working on 2016?

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

I am hoping someone will have a simple answer to this very worrying question. I recently upgraded my 2015 CRM solution to 2016, this solution uses the sales order processing piece within CRM. On the outset everything looked fine, until I started creating opportunities, quote etc...

I have varies JavaScript functions on my forms, some of which use the CRMRESTKIT to retrieve and update information in the database, these occur onload, onchange etc...

However, since upgrading I receive an error, each time my JavaScript is invoked:

2627.Capture2.png

After debugging I notice this error is caused in the rest kit code - I am using version "CrmRestKit-2.6.1.js".

I have tested the query that gets sent from my JavaScript to the rest kit and it works, so I am guessing there is a compatibility problem? the code breaks at this part of the CRM Rest Kit code :

Mscrm.TurboForm.Control.CustomScriptsManager.handleCustomScriptException = function(exc) {
    var $v_0 = Mscrm.TurboForm.Control.CustomScriptsManager.isExceptionFromOOBWebResource(exc, Mscrm.TurboForm.Control.CustomScriptsManager.get_instance().$BC_1);
    if ($v_0) {
        catchError(exc.message, window.location.href, 0, true);
    }
    else {
        var $v_1 = Mscrm.TurboForm.Control.CustomScriptsManager.getScriptErrorMessage(exc);
        if (!IsNull(exc.stack)) {
            var $v_3 = exc.stack.split('\n');
            if (!IsNull($v_3[0]) && !IsNull($v_3[1])) {
                var $v_4 = $v_3[0];
                var $v_5 = $v_3[1];
                $v_1 = $v_4.trim() + ' ' + $v_5.trim();
            }
        }
        var $v_2 = Mscrm.ErrorInformation.createExtendedErrorInfo('0x8063111B', null, exc.stack, [ $v_1 ]);
        openErrorDlg('0x8063111B', null, $v_2, 0, 0);
    }
} 


Please NOTE: Everything was fully tested and worked in 2015! Any help/advice welcomed!

Thanks In Advance

*This post is locked for comments

I have the same question (0)
  • Irene Chng Profile Picture
    40 on at

    hi Clarek,

    I'm Irene. May I know how do you solve this error then?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Irene,

    I used the SDK Rest Kit instead. This can be time consuming especially if you are upgrading and have a lot of code to update, but the SDK Rest Kit is supported with 2016, the CRMRestKit will not work with CRM 2016.

    Thanks & Goodluck

  • Irene Chng Profile Picture
    40 on at

    Noted, thank you.

    Eg,

    by CRMRestKit:

    var Collection = CrmRestKit.Retrieve("vw_asset", asset[0].id, warehouse);

    by SDK.REST.js:

    May I know how is the syntax looks like when use the SDK Rest Kit?

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

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
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans