+ Start a Discussion
Lakshmi SLakshmi S 

Account Created By & Last Modified By details in the Lightning-record-view-form?

Hi Team,

I have designed a detail page for the Account using LWC.
I want to display "Created By & Last Modified By" details in the Lightning-record-view-form.
how can we achieve this request?

Please let me know.


Naveen KNNaveen KN
I tried in Aura

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <div class="slds-p-bottom_large slds-p-left_large" style="width:500px">
        <lightning:recordViewForm recordId="5007F00001CiRBdQAN" objectApiName="Case">
            <div class="slds-box">
                <lightning:outputField fieldName="CaseNumber" />
                 <lightning:outputField variant='label-hidden' fieldName="LastModifiedById" />

It shows the last modified by user, but the label will be last modified by Id. In this case you can hide the label and add element for the label for this field. 

It must be similar in LWC.