You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
Parent field not being pulled in on Lightning web component
I am unable to pull in the parent field(Lease__c) for my LWC
HTML
JS
HTML
<template> <lightning-record-edit-form record-id={recordId} object-api-name="Lease_Payment_Term__c" onsuccess={handleSuccess} onsubmit ={handleSubmit}> <lightning-messages> </lightning-messages> <lightning-output-field field-name="Lease__c"> </lightning-output-field>
JS
import { LightningElement,wire, track } from 'lwc'; import { getPicklistValues } from 'lightning/uiObjectInfoApi'; import { getObjectInfo } from 'lightning/uiObjectInfoApi'; import Lease_Payment from '@salesforce/schema/Lease_Payment__c'; import Lease_Payment_Term from '@salesforce/schema/Lease_Payment_Term__c';
Greetings!
Can you please check the below 2 documentations which has sample code on how to pass the parent record details to the child record:
https://salesforcediaries.com/2019/07/24/lwc-communication-part-1-passing-data-from-parent-to-child-component/
https://salesforcediaries.com/2019/08/07/lwc-communication-part-2-passing-data-from-child-to-parent-in-lwc/
Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.
Warm Regards,
Shirisha Pathuri