Dynamic Forms and lightning-record-form

dynamic-formslightning-record-formlightning-web-components

I have started to read about and play around with Dynamic Forms. My question is this: if I setup an object to have a Dynamic Form as the lightning record page, and then build a custom LWC which contains a lightning-record-form component for the same object, will the displayed form use standard page layout, or the dynamic form?

Best Answer

lightning-record-form component will be based on standard page layout. Dynamic action will not impact it. I have done a quick check on this:-

enter image description here

Even if you remove a field from dynamic form, if the field is available on standard page layout, it will appear on the record form component.

My record Form component looks like this:-

<template>
    <lightning-record-form record-id={recordId} object-api-name={objectApiName} layout-type="Full" mode="view">
    </lightning-record-form>
</template>