Questions tagged [parent-to-child]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
51 views

LWC @api is not working in experience builder while logged in as community user

the main problem i have with this, is that it works well when i'm editing builder as Admin, but when i try to log as specific user, the ID's are not passed within the LWC'c I will show on example: ...
user avatar
2 votes
1 answer
28 views

How to use refreshApex on Parent Components?

what i am trying to achieve is, when i edit an account to active = 'Yes'. My LWC component show refresh dynamically and show that active account when i click show active accounts button, but its not ...
user avatar
-1 votes
2 answers
67 views

Write a code to pass a user input given in an Aura component to a child LWC component [closed]

So there is a Parent Aura component and a Child LWC component. I have to take a user input in the Parent Aura component, and now in the child LWC component, I have to show that input. I am pretty new ...
user avatar
1 vote
3 answers
112 views

Cant map parent-child SOQL To Map<Id, Set<Id>>

Hi Im kind of stucked here, What Im trying to do is getting a Map which for each key (Id) will have a set of related objects. Map<Id, Set<Id>> junctMap = new Map<Id, Set<Id>>([...
user avatar
0 votes
1 answer
161 views

In LWC JSON.parse(JSON.stringify(array)) not working as expected

I have an LWC that calls the backend, which makes a callout and returns the response wrapped inside an inner wrapper class with @AuraEnabled member variables and this wrapped class's @AuraEnabled ...
user avatar
  • 466
-1 votes
1 answer
133 views

Access lightning-record-edit-form fields from parent LWC

I have a child component with a lightning-record-edit-form that should work as a standalone component and as a child component as part of another flow. The form takes inputs from users and then, with ...
user avatar
0 votes
1 answer
167 views

LWC: setting child component width dynamically from parent

i'm doing this tutorial on "Parent To Child Component Communication Using LWC" (added with time markers: https://youtu.be/eiTPjZ5nL2w?t=3134 The issue is this error: As this is in the ...
user avatar
0 votes
1 answer
41 views

Save Parent - Child Hierarchy for same SObject in a single DML

I want to save the lookup relationship for same object in a single DML statement, so basically I want to do something similar like this but for same Sobject, I have found one article here but this is ...
user avatar
0 votes
1 answer
360 views

How to reset child combo box values on button click in parent LWC

I have Parent component LWC where I am displaying account records in html table and having filters for picklist where I have used combo box(Util combo box) . When I select the values in picklist it ...
user avatar
0 votes
0 answers
108 views

Calling method on child component not passing data LWC

I want to put an anchor tag on my parent component html that will open up a modal when a user clicks on '{iteratorname.value.LineStatus}' Right now it opens the modal but no data is showing up, and it ...
user avatar
0 votes
0 answers
255 views

Updating Account owner based on Territory2 and Account relationship

This is my Pseudocode Trigger on Territory2 before Update If IsChanged (UserTerritory2Association.User) Get AccountID of the Account assigned to the Territory from ObjectTerritory2Association Get ...
user avatar
0 votes
1 answer
350 views

LWC - Child not being updated from Parent

I have a picklist and when it is updated, it calls an Apex method to fetch new values for the child to render. However, the child component only loads initially when the page is rendered. After, when ...
user avatar
1 vote
1 answer
527 views

Update JSON value in child component sent by parent component LWC

Im passing a JSON from parent component to child component in LWC and I want to update the JSON in child component how can I do that? I think @api decorator is the cause that the JSON cannot be ...
user avatar
  • 47
0 votes
2 answers
124 views

Aura : Passing attribute across different components in containment hierarchy

I am trying to get the user's profile from Apex Controller once and re-use it across multiple components. I have a grandParent.cmp which creates a Parent.cmp. After the user does some selection on ...
user avatar
  • 4,591
1 vote
1 answer
81 views

Operating between two parents of a junction object

I have say object A, B and C with A and C as parent object and B as a junction object. What I want is- whenever a B is created between A and C, a field named field__c on A should be transferred to C ...
user avatar
0 votes
1 answer
242 views

Help with Parent-Child relationship in apex class

I created the following trigger. trigger Update_Case_Subject on Case (before insert) { for (Case c : trigger.new){ c.Subject = RecordType.DeveloperName + ' - ' + Account.JA_Account_ID__c + ...
user avatar
  • 1
1 vote
1 answer
155 views

LWC not able render Html tag in JS?

How to pass html tag from parent to child component in LWC ? Parentcmp.js msg ='' init() { this.msg =`<h1>Watch out!</h1><p>Unauthorized hockeying can result in penalties of ...
user avatar
0 votes
1 answer
63 views

Need help with Subquery in parent-child relationship query

I have a query where I have to query contacts and their cases only if case status != "Completed" or "Pending". But in my Parent-child query, cases are getting retrieved ...
user avatar
0 votes
0 answers
165 views

Filter child's picklist values based on parent object's picklist value

I'm trying to make the picklist options from a child object dependant based on the option picked on another picklist on a parent object. Both objects are custom objects. I had found the solution given ...
user avatar
0 votes
0 answers
77 views

How to use maps to get list of grand child records for a parent object

I have a parent object (Account), child object(Contract) and a grand child object(contract exceptions). Contract exceptions has master detail relationship with contract. My requirement is to fetch ...
user avatar
0 votes
0 answers
29 views

Is it possible to rerender pageblockSection located inside child apex:component?

I wonder if it is possible to rerender pageblockSection that is nested inside child apex:component. I noticed that rerender whole child visualforce component need wrapping it within some outputPanel ...
user avatar
  • 645
0 votes
0 answers
308 views

Best way to call child component in LWC

I am having a html table in my LWC. I have a tooltip displayed on hover on each table row. The content of the tooltip is placed inside the child component. Below is my code. <table class="slds-...
user avatar
  • 29
1 vote
0 answers
20 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'...
user avatar
  • 511
1 vote
0 answers
344 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 ...
user avatar
1 vote
1 answer
211 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 ...
user avatar
  • 1,298
0 votes
1 answer
130 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 ...
user avatar
0 votes
0 answers
288 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 ...
user avatar
0 votes
1 answer
497 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: ...
user avatar
0 votes
2 answers
672 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. ...
user avatar
1 vote
1 answer
464 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 ...
user avatar
0 votes
1 answer
2k 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, ...
user avatar
  • 252
0 votes
1 answer
76 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 ...
user avatar
  • 185
0 votes
1 answer
519 views

How to embed one lightning web component 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 ...
user avatar
  • 77
0 votes
2 answers
930 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. ...
user avatar
1 vote
1 answer
202 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-...
user avatar
0 votes
2 answers
1k 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 ...
user avatar
0 votes
1 answer
210 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 ...
user avatar
  • 3
1 vote
1 answer
812 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 ...
user avatar
  • 39
0 votes
1 answer
570 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 ...
user avatar
0 votes
0 answers
93 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 ...
user avatar
  • 315
0 votes
1 answer
439 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 ...
user avatar
0 votes
2 answers
511 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 ...
user avatar
  • 1
0 votes
1 answer
47 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&...
user avatar
  • 13
0 votes
0 answers
39 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 ...
user avatar
0 votes
1 answer
242 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). ...
user avatar
0 votes
1 answer
380 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 ...
user avatar
0 votes
1 answer
77 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 ...
user avatar
0 votes
1 answer
19 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 ...
user avatar
0 votes
1 answer
44 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'. ...
user avatar
  • 2,601
1 vote
0 answers
85 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 ...
user avatar
  • 11