function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Permission Denied in Firefox when setting logged in user in scontrol

We have an scontrol that is overriding the NEW button on LEAD that forces the user to search before having the ability to creating a lead. In the scontrol the search logs in as a search user with rights to see all records for duplicate detection using....
var result = sforce.Client.login("searchuser", "searchuserpassword”);

This process works in IE when I enable the ACCESS DATA SOURCES ACROSS DOMAINS option in Internet Options + Security + Custom Level + Miscellaneous. However this does not work in Firefox and I need it to.

I saw this thread about the same sort of subject but no solution:

I have added as a trusted site everywhere I could find in Firefox options and that didn’t help…

I added logic to grant universal browser read, but that didn’t help....

Digging further with Firebug I’m seeing the error is on:

uncaught exception: Permission denied to call method
XmlHttp(function(), "<?xml version='1.0' encoding='UTF-8' ?><soapenv:Envelope xmlns:soapenv='", false, function())sforceclient.js (line 833)
SendRequest("<?xml version='1.0' encoding='UTF-8' ?><soapenv:Envelope xmlns:soapenv='", function(), "login", false, "")sforceclient.js (line 895)
login("", "searchpassword", undefined)sforceclient.js (line 968)

I tried defining the callback with success / failure, which it now sees the undefined as an object, but I can’t get around that PERMISSION DENIED on the XMLHttpRequest. I have been looking at how to make the XMLHttpRequest, but I feel like I’m going in circles.

Thoughts or suggestions on how I can get this working in Firefox….?

I tried adding the user_prefs noted in this link to the pref.js and that didn't help.

Anybody changing users inside an scontrol to do something, violating premissions potentially, and able to do it using Firefox please shed some light and code on how your doing it...........
Any Mozilla based browser (Firefox, Camino, etc.) will return this error when you try to execute XMLHttpRequests from one domain to another ( to for example).

To get around this you need to disable cross site scripting protection within hidden preferences in Firefox or other Mozilla based browsers and add a line of code to your javascript library:"UniversalBrowserRead");

I've posted details on how to fix Permission denied to call method with respect to the Ajax Toolkit on my blog. The solution should be workable for your situation as well.

Although, this is only a fix during development as asking your users to do this to their Firefox browser is not an option.

Anyways, hope it sheds some light on the situation.