Questions tagged [parent-to-child]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
11 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
15 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
13 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
15 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
30 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
28 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
17 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
19 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'. ...
0
votes
1answer
670 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 ...
1
vote
0answers
41 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
35 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
83 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
272 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
79 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
959 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
366 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
70 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<...