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
Hi
the reason why Firefox could not resolve the success callback function is caused by the fact that Firerfox has a much more strict implementation of the javascript engine. Internet Explorer and Chrome are more forgiving in this area.
I'm glad things worked out for you
Bas
Hello Bas van de Sande,
Thanks for helping all the way down :)
Cheers!
Hi Guido,
My hero :)
Thank you So Much!!!
The above format resolved my problem !
I still wonder how chrome was able to reference the success callback function whereas firefox could not. ^_^
Hi Guido,
you were just ahead of me ;)
Bas
Hi
here is the Screenshot of Error Found.
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
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
i have written like 20+ javascripts dependent on SDK.Rest. Do you want me to change all code in them? :(
I did a quick search and found a library which might be a lifesaver for you: crmrestkit.codeplex.com
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156