You need to sign in to do that
Don't have an account?
Flex control not working in IE. but works in Google Chrome. Please help !
I've been using Google Chrome as the browser for developing the flex custom controls, and just found out it doesn't work in IE.
I have a simple control which retrieves information from the Lead record and populates it in a data grid. It works perfectly fine in the Chrome browser, but doesn't work in IE.
Can someone please help me here? I'm attaching the code which works fine in crome & not in IE.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="login()">
<mx:Script>
<![CDATA[
import mx.events.ItemClickEvent;
import com.salesforce.*;
import com.salesforce.objects.*;
import com.salesforce.results.*;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
[Bindable] public var sfdc:Connection = new Connection();
//Login information into salesforce.com
private function login():void {
var lr:LoginRequest = new LoginRequest();
lr.server_url = this.parameters.server_url;
lr.session_id = this.parameters.session_id;
lr.callback = new AsyncResponder(loginSuccess, loginFault);
sfdc.login(lr);
}
[Bindable] private var physical_zip:String = new String;
[Bindable] private var leadid:String = new String;
private function getData():void
{
leadid = this.parameters.lead_id;
sfdc.query("Select FirstName, LastName, " +
"Physical_Zipcode__c " +
"FROM Lead WHERE Id = '"+leadid+"' ",
new AsyncResponder(
function (qr:QueryResult):void {
var ar:ArrayCollection = new ArrayCollection();
if (qr.size > 0) {
for (var j:int=0;j<qr.size;j++) {
ar.addItem(
{lead_fname:qr.records[j].FirstName,
lead_lname:qr.records[j].LastName,
physical_zip:qr.records[j].Physical_Zipcode__c});
}
lead.columns = [new DataGridColumn('lead_fname'),
new DataGridColumn('lead_lname'),
new DataGridColumn('physical_zip')];
lead.dataProvider = ar;
}
},sfdcFailure
)
);
}
//Invoke function to retrieve data
private function loginSuccess(result:Object):void {
getData();
}
private function sfdcFailure(fault:Object):void {
Alert.show(fault.faultstring);
}
private function loginFault(fault:Object):void
{
Alert.show("Could not log into SFDC: "+fault.fault.faultString,"Login Error");
}
]]>
</mx:Script>
<mx:DataGrid x="283" y="292" id="lead">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>