I have a custom object AP_Customer_Relationship__c
. I use a <lightning-record-edit-form>
with a custom onSubmit
functionality. When I try to debug using event.detail.fields
, it appears as proxy and I cannot see any data. But when I debug using fieldname like event.detail.fields.Account_ID__c
, I can see the data.
Is there any way to see the whole object's data without using individual fieldnames?
Add a comment
|
1 Answer
I have use below code and able to get the all the fields.
handleSubmit(event) {
event.preventDefault(); // stop the form from submitting
const fields = event.detail.fields;
console.log(JSON.stringify(fields));
this.template.querySelector('lightning-record-edit-form').submit(fields);
}