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
CRMfusion - GWCRMfusion - GW 

Flex Error Message

I'm building a flex based Scontrol and I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.utils::URLUtil$/getProtocol()
    at com.salesforce::Connection/::_invoke()
    at com.salesforce::Connection/::invoke()
    at com.salesforce::Connection/query()

Any ideas?

Any ideas on a better way to debug that will give more specific error messages?

Ron HessRon Hess
are you running localy or in an scontrol?
are you able to get the sample code running as a first step?

are you using Flex Builder ?, it has a good debugger.

CRMfusion - GWCRMfusion - GW

I've sort of got it limping along and can get it to work in Debug under the Flex IDE and in FireFox.  When I try to access in in IE I get the following error:

Any ideas?

Message Edited by CRMfusion - GW on 05-14-2007 03:30 PM

Ron HessRon Hess
so your SWF works as an scontrol but fails when run from the hard disk under IE?
Vivek ViswanathVivek Viswanath


This is an issue we are facing too. This is because of the security policy on Salesforce Side. A little research that we did had to do with the crossdomain.xml file which grants access to a particular domain.

Another post suggest using login with credentials but we tried that and it did not work.

Thank you


Vivek Viswanathan

I have the exact same error when i put my flex application on a web server and trying to access it from the web server url. It only works access the file locally for me...
Any ideas how to fix this problem? I am trying to run this as a Flex application not embedded in Salesforce.
Hey Motoki,

Could provide some more details around your implementation?
I created a simple flex application that looks up contacts based on a search criteria. I would like the application to run as a standalone application.  When I try to run the SWF file I get the same error CRM Fusion posted in an earlier post. Is this makes sense? Thanks for your help.

Hi OneNewbie,

Took me awhile, but I finally got it to work on my localhost .net server (thanks Ron Hess).

1.  Set the protocol on the connection to http and use http in the serverUrl
<salesforce:Connection protocol="http" serverUrl="" />

2.  Make sure you are running on port 80 for your IIS or Visual Studio Development Server.  Here is a link on how to set the Development Server to a specific port:

That should do the trick.