You need to sign in to do that
Don't have an account?
Big Ears
lightning-record-form - render with sections
The new "lightning-record-form" Lightning Web Component is great, but it doesn't fully replicate layouts. For instance, layout sections aren't replicated. Is there any way to do this? Or plans for the sections to be supported in future?
Greetings to you!
Yes, in LWC, Lightning Record Form doesn't support sections as of now. Please refer to below link from salesforce stack exchange exactly with a similar issue.
https://salesforce.stackexchange.com/questions/262434/lwc-lightning-record-form-is-not-respecting-page-layout
You can use lightning/ui*Api to retrieve sections in LWC.
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_wire_adapters_record_ui
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_ui_api
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Yes, in LWC, Lightning Record Form doesn't support sections as of now. Please refer to below link from salesforce stack exchange exactly with a similar issue.
https://salesforce.stackexchange.com/questions/262434/lwc-lightning-record-form-is-not-respecting-page-layout
You can use lightning/ui*Api to retrieve sections in LWC.
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_wire_adapters_record_ui
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_ui_api
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Thank you - I thought that was the case, but was hoping I wouldn't have to!
The RecordUI call for "getRecordCreateDefaults" returns the info. Looks like I might try to use that for now....
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_wire_adapters_create_record_values