You need to sign in to do that
Don't have an account?
Diederik Verstraete
Enable User Profile Pic in custom component (lightning:outputField) ?
How can I add the small User Profile Picture when I referrence the OwnerID via
<lightning:outputField fieldName="OwnerId" />
Currently, I only get the Name. I want it to be like on any other page: the photo + name.
I want it like this:
My current code is:
<aura:component implements="force:hasRecordId,forceCommunity:availableForAllPageTypes"> <aura:attribute name="recordId" type="Id"/> <lightning:layout> <lightning:layoutItem size="6" padding="around-small"> <lightning:recordViewForm recordId="{!v.recordId}" objectApiName="cxsrec___cxsPosition__c"> <lightning:outputField fieldName="OwnerId" /> </lightning:recordViewForm> </lightning:layoutItem> </lightning:layout> </aura:component>This component is used inside an accordeon Section:
<lightning:accordion> <lightning:accordionSection label="Label1"> <aura:set attribute="body"> <my component> </aura:set> </lightning:accordionSection> </lightning:accordion>
I hope below code can resolve your issue.
<lightning:icon iconName="action:user" alternativeText="User" />
Shradha Ys,
This code will add a fixed image, not dynamic based on the value of OwnerID.
Do you know maybe another solution?