1

MY LWC looks like below

import { LightningElement,api } from 'lwc';
import ENGAGE_SUBJECT_FIELD from '@salesforce/schema/Engagement__c.Subject__c';
import ENGAGE_INDUSTRY_GROUP_FIELD from '@salesforce/schema/Engagement__c.Industry__c';
import ENGAGE_OWNERSHIP_FIELD from '@salesforce/schema/Engagement__c.Subject__r.Ownership';

export default class Basecomp extends LightningElement {

    @api recordId;
    //console.log(this.recordId);
    partyEngageFieldsRead = [ENGAGE_SUBJECT_FIELD,ENGAGE_INDUSTRY_GROUP_FIELD,ENGAGE_OWNERSHIP_FIELD];

}

HTML File

<lightning-record-form record-id={recordId} object-api-name="Engagement__c" fields={partyEngageFieldsRead} columns="1" mode="view"> </lightning-record-form>

When I pass the above field to a lightning-record-form and add this on record page, I am not able to see Ownership field.

Subject__c is lookup field to Account.

Any pointer over here!!!

1
  • 1
    Got the answer. In LWC, we cannot use spanning field in Lightning-record-form. This is still a feature which is currently missing in LWC. Jul 9 '19 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.