I'm trying to get the response in the onSuccess callback for a lightning:recordForm save event, but it's coming up as undefined. The callback is being called, I can log to the console, but both of the following lines return undefined:
let payload = event.getParam('response');
and
let payload = event.getParams().response;
console.log(payload);
undefined
Has something been updated in Spring 2019? Is there a difference between the EditRecordForm and the edit for the RecordForm?
Component code:
<aura:if isTrue="{! v.showForm}">
<lightning:recordForm onsuccess="{! c.updateInfo }" objectApiName='Contact' fields='{! v.fieldList }' recordId="{! v.recordId }" mode="view"/>
</aura:if>
Controller:
updateInfo: function(component, event, helper){
console.log('in update info, the event: ', event, ' the helper: ', helper);
let payload = event.getParam('response');
console.log('the payload: ', payload, 'the payload fields: ');
helper.setClinicianInfo(component, helper);
}