function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.

Thanks,
Lakshmi.

 
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" />
            </div>
        </lightning:recordViewForm>
    </div>
</aura:component>

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.