You need to sign in to do that
Don't have an account?
Gopinath418
Redirect to app page issue
I have a lightning component which will display a New button and if we click on it the standard account creation dialog box will open, fill the details and save the account.
Have created a App page and have included above created to the app page.
once i click on New button the account creation dialog box is opening but after saving it, the controller going to account detail page, actually it shoud not go (it should be in the app page only)
I have used below code to navigate component but when i click on new button the dialog box is opening and with in sec it is redircting to app page.
please suggest me how to handle it?
Please see below my code:
Component - mytest1
=====================
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction"
access="global">
<aura:handler event="force:createRecord" action="{!c.handlecreateEvent}"/>
<ui:button label="New" press="{!c.createRecord}"/>
</aura:component>
Js controller
=========================
({
createRecord : function (component, event, helper) {
var createRecordEvent = $A.get("e.force:createRecord");
createRecordEvent.setParams({
"entityApiName": "Account"
});
createRecordEvent.fire();
},
handlecreateEvent : function(component, event) {
var evnt = $A.get("e.force:navigateToComponent");
evnt.setParams({
componentDef:"c:mytest1"
});
evnt.fire();
}
})
Thanks
Gopi
Have created a App page and have included above created to the app page.
once i click on New button the account creation dialog box is opening but after saving it, the controller going to account detail page, actually it shoud not go (it should be in the app page only)
I have used below code to navigate component but when i click on new button the dialog box is opening and with in sec it is redircting to app page.
please suggest me how to handle it?
Please see below my code:
Component - mytest1
=====================
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction"
access="global">
<aura:handler event="force:createRecord" action="{!c.handlecreateEvent}"/>
<ui:button label="New" press="{!c.createRecord}"/>
</aura:component>
Js controller
=========================
({
createRecord : function (component, event, helper) {
var createRecordEvent = $A.get("e.force:createRecord");
createRecordEvent.setParams({
"entityApiName": "Account"
});
createRecordEvent.fire();
},
handlecreateEvent : function(component, event) {
var evnt = $A.get("e.force:navigateToComponent");
evnt.setParams({
componentDef:"c:mytest1"
});
evnt.fire();
}
})
Thanks
Gopi
Thanks,
Gopi
Thanks
Please suggest me how could i redirect to lightning page?
Thanks,
Gopinath