I'm trying to get field values at Lightning:recordEditForm onSubmit() event.In the documentation example it shows below.

enter image description here

my onSubmit event handler as below, enter image description here

I end up getting error,

enter image description here

[event.detail is undefined]

Not too sure why I'm getting this error, I hope it's correct as per documentation.

Question: Why do I get this error, seems not a spelling mistake?

Also wondering where to find any documentation on what's available in Lightning:recordEditForm onSubmit event's parameters? Lightning component Library Documentation seems not covering much information this regard.

Appreciate any help, suggestions on this. Cheers!

1 Answer 1


Reference documentation is incorrect; i.e.: of lightning web component: lightning-record-edit-form, where to access the data we use:

console.log('fields: ' + JSON.stringify(event.detail.fields));

And in your example, you are working with lightning aura component: lightning:recordEditForm, here the syntax is:

console.log('fields: ' + JSON.stringify(event.getParam('fields')));
  • Thank you, appreciate your help @Raul, got misled by same same name. By any chance do you know where I could find what attributes are included in fields , couldn't find any documentation around it. Thanks! Commented Jun 2, 2019 at 23:44
  • You're welcome, and it returns an object or map of fields, you could find more information on documentation tab of component.
    – Raul
    Commented Jun 3, 2019 at 4:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .