You need to sign in to do that
Don't have an account?
Kalpesh Vyas 14
force:createRecord is not working
Hello,
I am getting below error while trying to use force:createRecord in one of my lightning component
Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
Here is component
I am getting below error while trying to use force:createRecord in one of my lightning component
Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
Here is component
All Answers
I seen this standard behavior takes me to object which is recently created after I click on save, is it something possible or avaiable to prevent this behavior of redirection and stay on the detail page (the page which opened this window) after save?
force:createRecord event is not working when I click the "Create Record" button. Please find the code below:
CreateRecordEvent.cmp:
<aura:component implements="flexiPage:availableforAllPagetypes,force:appHostable">
<lightning:button label="Create Record" value="{!c.CreateRecord}" variant="brand"/>
</aura:component>
CreateRecordEventController.js:
({
CreateRecord : function(component, event, helper) {
var createRecordEvent = $A.get("e.force:createRecord");
createRecordEvent.setParams({
'entityApiName':'Account',
});
createRecordEvent.fire();
}
})
Please help.
can we pass dynamic values instead of hard coded values in default fields like below,
"defaultFieldValues": {
Opportunity__c' : OppID.AccountId
}
Any one please suggest if you have faced this so far.
Thanks,
Sravan