You need to sign in to do that
Don't have an account?
Zaid Darbar
Lightning Component Button not working in web but working fine in SF1
Hi,
I have this small aura lightning component which has a simple button which redirects me to a case record. It is working fine in SF1 but it is not working in web browser. Any help will be appreciated :)
i am getting the following error:
"Something has gone wrong. Cannot read property 'setParams' of undefined. Please try again."
_____________________________________________________________________________
component
<aura:component implements="force:appHostable">
<ui:button press="{!c.navigate}" label="NavigateURL" ></ui:button>
</aura:component>
___________________________________________________________
({
navigate : function(component, event, helper) {
var urlEvent = $A.get("e.force:navigateToURL");
var myUrl = '/50028000007kPj9';
urlEvent.setParams({
"url": myUrl
});
urlEvent.fire();
}
})
_____________________________________________________
I have this small aura lightning component which has a simple button which redirects me to a case record. It is working fine in SF1 but it is not working in web browser. Any help will be appreciated :)
i am getting the following error:
"Something has gone wrong. Cannot read property 'setParams' of undefined. Please try again."
_____________________________________________________________________________
component
<aura:component implements="force:appHostable">
<ui:button press="{!c.navigate}" label="NavigateURL" ></ui:button>
</aura:component>
___________________________________________________________
({
navigate : function(component, event, helper) {
var urlEvent = $A.get("e.force:navigateToURL");
var myUrl = '/50028000007kPj9';
urlEvent.setParams({
"url": myUrl
});
urlEvent.fire();
}
})
_____________________________________________________
ritesh kumar 44
The event which you are using is a standard salespforce 1 event which you cannot use in desktop/browser .This events works only in salespfrce 1 native app.Thats why ur getting this error.