• BL
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I'm trying to get at the childRelationships from the result of a describeSObject call using the Flex Toolkit's as3Salesforce.swc.

Trying something simple such as:

Code:
result.childRelationships

will return "undefined", rather than the array of childRelationship objects as one would expect.

For example, this code is straight from salesforce.mxml with one minor change:
Code:
   private function describeSObjects():void
   {
    // this call can take one or more object names to describe in full
    apex.describeSObjects(
    // ["Account","Contact"], 
     ["Account"], 
      new AsyncResponder(describeSObjects_CB, genericFault));
   }
   private function describeSObjects_CB(result:Object):void
   {
    ta.text = 'describeSObjects_CB Result\n' + ObjectUtil.toString(result.childRelationships);
   }

The only thing I've changed is the last parameter from "result" to "result.childRelationships". Am I wrong in expecting that this should pretty print the childRelationships from the result of the describeSObject call against the Account object?

ObjectUtil's pretty print method, toString(), will happily print out the "result" variable above, but trying to actually access the "result" variable as if it were DescribeSObjectResult class object is completely fruitless. Asking for result.childRelationships.length will return a logical result, the number of elements in the childRelationships array, but trying to access one of those elements with something like:

Code:
result.childRelationships[0]

will simply return "undefined".

Anyone else having this problem? Any suggestions on what I'm doing wrong?

For reference the Salesforce Flex Toolkit can be downloaded from here: http://wiki.apexdevnet.com/index.php/Members:Flex_Toolkit_download

Thanks,

Ben Lam


  • March 02, 2008
  • Like
  • 0
I'm trying to get at the childRelationships from the result of a describeSObject call using the Flex Toolkit's as3Salesforce.swc.

Trying something simple such as:

Code:
result.childRelationships

will return "undefined", rather than the array of childRelationship objects as one would expect.

For example, this code is straight from salesforce.mxml with one minor change:
Code:
   private function describeSObjects():void
   {
    // this call can take one or more object names to describe in full
    apex.describeSObjects(
    // ["Account","Contact"], 
     ["Account"], 
      new AsyncResponder(describeSObjects_CB, genericFault));
   }
   private function describeSObjects_CB(result:Object):void
   {
    ta.text = 'describeSObjects_CB Result\n' + ObjectUtil.toString(result.childRelationships);
   }

The only thing I've changed is the last parameter from "result" to "result.childRelationships". Am I wrong in expecting that this should pretty print the childRelationships from the result of the describeSObject call against the Account object?

ObjectUtil's pretty print method, toString(), will happily print out the "result" variable above, but trying to actually access the "result" variable as if it were DescribeSObjectResult class object is completely fruitless. Asking for result.childRelationships.length will return a logical result, the number of elements in the childRelationships array, but trying to access one of those elements with something like:

Code:
result.childRelationships[0]

will simply return "undefined".

Anyone else having this problem? Any suggestions on what I'm doing wrong?

For reference the Salesforce Flex Toolkit can be downloaded from here: http://wiki.apexdevnet.com/index.php/Members:Flex_Toolkit_download

Thanks,

Ben Lam


  • March 02, 2008
  • Like
  • 0
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:
http://community.salesforce.com/sforce/board/message?board.id=ajax_toolkit&message.id=619&query.id=9179#M619

I have added salesforce.com 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 XMLHttpRequest.open
XmlHttp(function(), "<?xml version='1.0' encoding='UTF-8' ?><soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/s...", false, function())sforceclient.js (line 833)
SendRequest("<?xml version='1.0' encoding='UTF-8' ?><soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/s...", function(), "login", false, "https://www.salesforce.com/services/Soap/u/7.0?nocache=1175710190078")sforceclient.js (line 895)
login("searchuser@ourdomain.com", "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….?
 
Thanks-
Edmund

  • April 04, 2007
  • Like
  • 0
Hi,
 
I keep getting this error in Firefox. 
uncaught exception: Permission denied to call method XMLHttpRequest.open
 
I also get "Permision denied" in IE7.
 
I have read that this is possisbly a Firefox issue but after adding the following line I still get the error. 
 

function init() {

if (window.XMLHttpRequest) sforceClient.appType = Sforce.Application.Type.FireFox;

}

This function is called from the Body oload.

I beliveve this functionality worked in IE6 but I cannot vouch for it.

Any assistance would be appreciated.

MF

Message Edited by falkson on 10-20-2006 11:14 AM

 

Message Edited by falkson on 10-20-2006 11:15 AM

"Permission denied to call method XMLHttpRequest.open"
 
I am testing with some cross browser apps.
 
I have an HTML page which I load locally which has the the following :
 
      Code:
var result = sforceClient.login(DebugUser,DebugPass); 

 
This works fine when I test with IE (6.0.2900.) but with FF (1.5.0.4) it throws the above exception.
 
I can't find the call that is throwing the error (the debugger is not really that good in FF) but I have had the same issue when trying to load XML documents which was caused by the following:
 
ThIS Works in IE but not in FF
 

Code:

Tester= getXMLHTTPRequest();

Tester.open("get","Sample.xml",false)

Tester.send();


 

Works fine in IE but in FF it throws the same error. FF, it seems, demands a NULL parameter in the send.

Code:

Tester= getXMLHTTPRequest();

Tester.open("get","Sample.xml",false)

Tester.send(null);


 
This works with both . Perhaps this is the issue here as well?

I have no problem using

Code:

sforceClient.init("{!API_Session_ID}","{!API_Partner_Server_URL_70}");


 
 Within an SControl on FF 1.5, so I don't think this is super-urgent, but it would improve things on the testing front here as we have other surpise errors caused by cross-domain calls that are making life difficult enough!

Any comments or suggestions welcomed.

Thanks

Gareth.

 
 

Message Edited by Gareth Davies on 06-14-2006 03:30 PM

Hi, just wondering if there have been any recent changes to beta 3.3... Last week, my standalone reports (non S-Control) were working fine in both Firefox and IE, but now none of the Firefox reports will work and "uncaught exception: Permission denied to call method XMLHttpRequest.open" is the error I'm getting through the javascript console.

Any ideas?

Thanks,
-Zach
  • April 11, 2006
  • Like
  • 0