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 :
Microsoft Dynamics CRM (Archived)

SDK.REST.js not working in Firefox

(0) ShareShare
ReportReport
Posted on by 2,585

Hello Devs,

I have been using SDK.REST.js in my project.

It works fine  with IE and Chrome, but in firefox it gives Error. Any ideas?

I tested in many different versions of Firefox, same problem :(

var oppvalue = Xrm.Page.getAttribute("new_opportunitylookup").getValue();
    if ((oppvalue != null))
    {
        //var lookuptextvalue = oppvalue[0].name;
 		var lookupid = oppvalue[0].id;		
		SDK.REST.retrieveRecord(lookupid, "Opportunity", null, null, getDetails, errorHandler);	
			


in the above code, the code breaks at SDK...

I am using Dynamic CRM 2015 Online Latest Update

Thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Jitendra Sahu Profile Picture
    2 on at

    Check whether the URL of the SDK.REST.js is getting resolved or not.

  • Bas van de Sande Profile Picture
    4,383 on at

    Can you step with the Firefox debugger through the code (or with fiddler)?

  • omgcrm Profile Picture
    2,585 on at

    HEllo people,

    No i am not able to debug code in Firefox.

    As soon as the pointer comes at SDk... IT jumps off to errorhandler function.

    It is not executing the getdetials function.

    and this issue is only in Firefox :( 

    Help!

    Thank you

  • Bas van de Sande Profile Picture
    4,383 on at

    Have you tried to run it from another machine (running Firefox)? Just to make sure it is not related to a specific computer.

    Bas

  • omgcrm Profile Picture
    2,585 on at

    Hello Bas van de Sande,

    Yes the problem appears on many multiple systems using firefox.

    The javascript which is not dependent on SDK.Rest.js works fine, but the ones which are depending are giving errors.

    Thank you

  • Bas van de Sande Profile Picture
    4,383 on at

    I did a quick search and found a library which might be a lifesaver for you:  crmrestkit.codeplex.com

  • omgcrm Profile Picture
    2,585 on at

    i have written like 20+ javascripts dependent on SDK.Rest. Do you want me to change all code in them? :(

  • Suggested answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi,

    do you use the latest version of SDK.Rest.js?

    In your case the problem seems to be caused by an incompatibility between the SDK.Rest and Firefox.  In another thread on this forum you find a similar problem (with a possible solution).

    community.dynamics.com/.../150339

    They ended up by replacing the rest call with another call

    I hope this works out for you

    Bas

  • omgcrm Profile Picture
    2,585 on at

    Hi

    here is the Screenshot of Error Found.

    c1.JPG

    function regionallookups()
    {
    var lookUpObjectValue = Xrm.Page.getAttribute("new_contactlookup").getValue();
    if ((lookUpObjectValue != null))
    {
    var lookupid = lookUpObjectValue[0].id;
    SDK.REST.retrieveRecord(lookupid, "Contact", null, null, getDetails, errorHandler);

    function getDetails(contact)
    {
    Xrm.Page.getAttribute("new_designation").setValue(contact.JobTitle);
    }
    function errorHandler()
    {
    alert("Error Fetching Contact Details");
    }
    }
    }

    its saying "getdetails in not found" even though its there.

    The problem is occurs only in Firefox not in IE and chrome.

    I tested with Xrm Service toolkit, Same error.

    Help!

    Thank You

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans