Quantcast
Channel: Active questions tagged fields - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 57

How to import parent object field in lightning record form of child custom object?

$
0
0

There is Contact object as parent object and I have created a custom object called Vaccination_Information__c which is a child of Contact object.

I want to include the contact name field from Contact object in Vaccination_Information__c object lightning record form that I have created using LWC. How should I import it in the JS file?

Below is the code line that I have written but shows error:

import CONTACTNAME_FIELD from '@salesforce/schema/Vaccination_Information__c.Contact__c';

where Contact__c is the api name for the master detail relationship. and the error is:

Invalid reference Vaccination_Information__c.Contact__c of type sobjectClass in file vaccineReg.js


Viewing all articles
Browse latest Browse all 57

Trending Articles