You need to sign in to do that
Don't have an account?
Shubham Agrawal 13
how to navigate record crate page of lightning experience from lightning component?
Hi All,
I am new to Salesforce Lightning, Please help me to do this requirement.
I tried by using '$A.get( 'e.force:createRecord' )' this standard event but its not working.
Thanks in advance...
I am new to Salesforce Lightning, Please help me to do this requirement.
I tried by using '$A.get( 'e.force:createRecord' )' this standard event but its not working.
Thanks in advance...
createAcountContactEvent.setParams({
"entityApiName": "Contact",
"defaultFieldValues": {
'Phone' : '123467890',
'AccountId' : '001***********' }
});
createAcountContactEvent.fire();
Try like this, it will work.
I have already tried with the same type of code you suggested before posting this question here, It's not working.
Actually I am calling my lightnin component from VF as below :
<script>
function redirectTolightning(){
$Lightning.use("c:TestLightning_App", function() {
$Lightning.createComponent("c:c:TestLightning_Comp",
"lightning",
function(cmp) {
console.log('>>>>> App is hosted');
});
});
}
</script>
Then i wrote 'force:createRecord' event (with proper syntax as you have witten) in Lightning Component (i.e Lightning Javascript Controller), But its not working.
I am niether getting any error nor redirected to standard record create page.
Is there any other solution to this?? While navigating i have to populate some field values also...
Please help...
please double check you are using
$Lightning.createComponent("c:c:TestLightning_Comp", )
please remove on c: they came twice in script.
In the org there is only one 'c' like this - $Lightning.createComponent("c:TestLightning_Comp", )
you are doing fine, just check weather you included <apex:includeLightning/> tag.