Questions tagged [parent-to-child]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
13 views

Lifecycle hook for child component?

I understand lifecycle hooks for a custom LWC. But how do I detect when a child LWC has loaded in the DOM? For example, let's say I have a <lightning-datatable> that is a child of a custom LWC I'...
1
vote
0answers
29 views

renderedCallback method in child component not recognized (undefined) when variable passed from parent component

I am trying to pass a variable from parent component to child component in LWC. But when I tried to access this variable in renderedCallback method of child component, it is showing loanId as ...
1
vote
1answer
35 views

Using Wire in a Child Lightning Web Component

I'm trying to build a TabSet form where each child component is a different form. I would like to use @wire in the child components to grab the object needed for the form. However, I can only get it ...
0
votes
1answer
17 views

How would I go about creating parent/child records on a custom object? [closed]

I'm trying to import a list of grant awardees. I have a custom object called Grant, in which I will import all of the various grants (Grant A, Grant B, Grant C, etc.). I could create a custom object ...
0
votes
0answers
39 views

Related list of child object not showing in parent Object

Correct me if im wrong, In my knowledge I have to create a look up Account field in the child object for the related list appear in Parent Object (account) but it is not showing in Parent. Is my ...
0
votes
1answer
35 views

Render Child Component again with a Change on Parent

I am trying to do display some data in the child component from Parent Component where my parent Component has an object variable that am using to display on my child component. Here's Simple Snippet: ...
0
votes
2answers
86 views

Unable to send @api Object variable or array in LWC from parent to Child

Please help whenever I am trying to pass the object then it is not getting passed from Parent to Child but if I am passing string values then it is getting passed to child component. Please help. ...
1
vote
1answer
49 views

Issue with lightning-record-edit-form event order of execution between Parent and multiple Child LWCs on Submit

I'm new to LWCs development. I'm having an issue understanding the order of execution for the lightning-record-edit-form component when a Parent lwc has multiple Child lwcs. Each Child component ...
0
votes
1answer
198 views

Trying to refresh child LWC Data from parent component new values

I'm trying to pass the new data from a parent LWC to a child. The data is a list of wrapped objects with the following properties: string, string, list, list. I'm able to send and it renders perfect, ...
0
votes
1answer
25 views

Why ExternalID field of parent Account is null?

I have the next code on my test Class: parentAcc.ExternalId = '001'; insert parentAcc; System.debug('parentAcc ExternalId' + parentAcc.ExternalId); childAccount.ParentId = parentAcc.id; insert ...
0
votes
1answer
35 views

How to embed one ligtning web compoent in another web component

I have a component where i need to embed it to another component i am getting the below error No MODULE named markup://c:lifeCycleChild found : [markup://c:lifeCycleParent] Below is My code : 1st ...
0
votes
2answers
221 views

Unable to pass an array from parent LWC to child LWC setter method

Trying to pass a array value from parent component to child component using setter method in child LWC but empty value is being passed to child setter method. I am Using parent LWC as a quick action. ...
1
vote
1answer
31 views

Parent LWC cannot set a child JS Property

Main LWC HTML: <template> <c-product-code-entry onproductidchanged={passProductIdToDisplayPanel}></c-product-code-entry> <c-stock-display-panel></c-stock-display-...
0
votes
2answers
174 views

LWC Child Methods on Child Component

I am new to lwc. I have a method in the child component which returns a string. I called the child method from the parent components but it fails to return the string to the parent component. Did I ...
0
votes
1answer
20 views

Get all child recrods

I have object Sales with self relationship. I want to ger Parents and all Child, but it has multiple level hierarchy. To get Parent i just search for recotd with Parent__c = null. To get Child i ...
0
votes
1answer
224 views

Validation Rule on Parent Object blocking any activity on Child records?

I have a Validation Rule on Account, that when reaching a certain stage, several fields need to be filled out. A user couldn't log activities on Contact related to this account due to this Validation ...
0
votes
1answer
176 views

Publish/Subscribe Message Service VS Parent to Child LWC

Quick theoritical question. I've read about the lightning message service communication between Lightning Web Components and it was specified that this type of communication is between unrelated ...
0
votes
0answers
46 views

Two parent component invoking the same child component issue

I have an issue that seems to show that I am missing something in LWC I have a big Parent component lets call it A This component A has two child component B and C. Both B and C component are using a ...
0
votes
1answer
112 views

AccountContactRelation and child custom objects. Sharing behavior

I'm using AccountContactRelation to give access to some accounts to my community users. It's working great in this regard. but the thing is, i got a custom "Contrat" object that is a child ...
0
votes
2answers
118 views

Constrain child picklist based on parent picklist

I have a Case object which has 'Category' picklist with values 'Plumbing','Electrical' etc to handle the issue customer is reporting. Need to have a child object 'Parts' and it needs a Parts Picklist ...
0
votes
1answer
25 views

Assigning Child Records to a List from a Parent to Child Query

Why does A work but not B? For B I receive the error: "Variable does not exist: Contacts". A List<Account> accts = [SELECT id, (SELECT id FROM CONTACTS) FROM Account]; List<Contact&...
0
votes
0answers
17 views

Add all acounts in hierarchy including parent account

I have a scenario to create a field to show the total number of all accounts in hierarchy including the parent account. For example, add ‘Projects’ field that calculates number of account in hierarchy ...
0
votes
0answers
20 views

SOQL query to get files names related to account [duplicate]

I want to get the names of all related files in the Account object. Below is my query: SELECT Name, (SELECT Id from Attachments) FROM Account WHERE Id= '0014K00000C6b7pQAB' When I run the query, it ...
0
votes
1answer
77 views

Visualforce page at parent with table records from custom child

I have a parent custom object called Game__c and a child custom object called Player__c.). The child Player__c has 4 fields: Name(String), Phone__c(Number), isHealthy__c(boolean), and Game__c(lookup). ...
0
votes
1answer
163 views

Calling child component method for all iterations

I have a component that iterates over an array of objects, and for each one, renders a child component: <template> <template if:true={filters}> <lightning-layout multiple-rows ...
0
votes
1answer
19 views

Refer to parent object in Trigger [duplicate]

I have a trigger on Contact which gets fetches 2 custom field from account (customfieldaccount) and contact(customfieldcontact). I am having null value for the custom field on the Account object. Here ...
0
votes
1answer
13 views

How do I populate individual dates using addDays() onto a series of child records?

To give you some context, I'm writing a trigger between a parent-child relationship ("Event" - "Day"). When entering number of days into the Event__c object, I would like to ...
0
votes
1answer
24 views

NPSP Campaign/Volunteer Jobs parent query

We are using NPSP Volunteers for Salesforce package. I am trying to query camapainsg and all associated volunteer jobs. The name of the child relationship, according to the UI, is 'Volunteer_Jobs'. ...
1
vote
0answers
67 views

Can I use Apex and SOQL to import data from other objects into a new custom object?

This is my first time posting in stack exchange :) I have a Salesforce Admin Cert, but I have very little experience in the realm of writing code. So here goes. The goal of my apex code is to import ...
0
votes
1answer
40 views

Best practice: Architecture for accounts with many locations 10k+

I'm facing an architectural design where a company could have more than 10k locations, and I would like to save the location data, according to this link it's a good practice to use a hierarchical ...
0
votes
1answer
332 views

How to fetch Contact and Case data with LiveChatTranscript using SOQL Lookup relationship

I have Contact and Case relationship mapped to LiveChatTranscript through ContactId and CaseId like the following: I need to fetch LiveChatTranscript data along with Contact and Case in a single ...
1
vote
1answer
695 views

Record ID is not passing from Aura component to LWC component

I have a requirement to validate a few fields before submitting the record. I have created an Aura component and calling the LWC code to do some validation. Aura Cmp: <aura:component implements=&...
0
votes
1answer
162 views

How to perform Global search on account hierarchy to display related records

I have an account with account hierarchy setup and there is one Custom object "Agreement" added as related list on the account. When, I search an account with an account name on global ...
1
vote
1answer
2k views

How to pass a mutable Array from Parent Component to Child Component in LWC

I want to pass an Array of Objects from a parent to child component. The child component will modify this array (but not perform a DML). This is what i tried somewhere in parent.js @track tempList = []...
0
votes
1answer
870 views

Can you call getRecord or @wire from child component?

I'm trying to make a basic with the @wire method on the contact record to pull in a phone number. But the error I keep getting is Cannot read property 'fields' of undefined on c:ParentElement Cannot ...
0
votes
1answer
204 views

Get data from Grandparent while creating child record [duplicate]

while creating child record need to get data from Grand parent. i wrote a trigger but not updating fields. here my working. trigger Registration on Opportunity (after Update) { list<...
0
votes
1answer
2k views

[LWC]: Updating an @api object referenced in a child component doesn't update the value in the child

I have a playground to demonstrate this. I have two variables that are being linked to the child component. myString is a String and myObject is an Object. Both variables are being updated 500ms after ...