Questions tagged [child-to-parent]

The tag has no usage guidance.

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

How to delete child lookups from the parent after reparenting

Im a beginner and still learning to write apex.. Im creating a new object from the old object. I want to reparent the Lookup to the new object and delete it from the old object. //map of ids of new ...
0
votes
1answer
60 views

Can you query two levels up in a hierarchy?

Hard to explain, but we have opportunities of many different types. I need to only get opportunities of a specific type, which i have done. Now I need to only get projects that have opportunities of ...
0
votes
1answer
20 views

In Test class no result for Order.Account.RecordTypeId

In a test class, I want to update Account information depending on the record type. The information to update comes from the Order object. I have created a test account with the according record type. ...
0
votes
1answer
25 views

How to pass event.preventDefault(); from child to parent

I have a wizard with a child object. The child object has an event.preventDefault(); (Step 2 wizard). How do I pass this to the wizard (parent) to prevent going to the next page (step 3) of the wizard....
0
votes
0answers
17 views

Don't leave Parent Page after adding a new Child object

I have an object: Parent and an object: Child on my SalesForce, the issue is that when I am on my parent object and I click on 'create new child' then I create this child, after confirming that child ...
0
votes
0answers
21 views

Undefined value on recordID for child component lightning [duplicate]

I have a parent component and a child component for binding data through attribute. Child --> Parent. When I test the child data isolated, I can retrieve correctly the recordID, but nevertheless when ...
0
votes
0answers
15 views

Show chatter feeds of child case on main one

We are using the main and child case structure which means a case can have many child case but child cases cannot have also child case. In this structure, I want to show all chatter feeds on main case ...
0
votes
2answers
76 views

How to set multiple objects as parents for a custom object

I have requirement where a custom objects needs to have multiple objects as its parents. For example a custom object must have master-detail relationships with Account, Opportunity, Case etc. We can ...
1
vote
1answer
46 views

Do really row counts from parent-child relationship sub-queries contribute to the row counts of the overall code execution?

Most of us know this is a very basic question but I little confused here again, As per the documentation here, it says that parent-child query row count is added to the overall row count in the ...
2
votes
1answer
943 views

Lightning component - pass data from child to parent

According to this salesforce developer blog when passing data down from parent to child component, you can use attributes (or exposed methods) and when passing data up from child to parent you can ...
0
votes
2answers
62 views

How to update parent field with child field value FOR EXISTING records

There are two Objects with master-detail relationship (Contact and Certification__c) I need to copy a textfield(Name) value from the child object(Certification__c) and paste it on it's Parent's(...
0
votes
2answers
63 views

Getting a record's sibling records in SOQL with a single query

I've looked high and low and cannot find an answer to this question. Lets say I have a custom object called Appointment__c which is a child of the Case object, I have a VisualForce page that is ...
0
votes
1answer
57 views

Need help on trigger which is used to update parent record when child record value changes

Hi i have written trigger in which SC_Problem_Management__c is parent object and SC_Problem_Case_Link__c is child object having master detail relationship. I want to update status field of parent ...
0
votes
0answers
698 views

DUPLICATE_VALUE: Maximum number of duplicate updates in one batch (12 allowed)

I am getting this error when Leads are updated in bulk. Actually, it happens when the Lead Object Process criteria try to update a checkbox field on an Account. So when more than 12 child lead ...
0
votes
1answer
35 views

Options for entering parent-child data

At the risk of having this question tagged as too general... We are implementing SF in our organisation. There are several instances of parent-child relationships, for example, entering a student's ...
0
votes
1answer
911 views

How to access aura:id of a tag present in child component in a parent component controller

I have created a form where more than 10 radio groups were being used, so instead of using lightning:input tag several times , I made a child component of the radio group . And used it several times ...
0
votes
2answers
36 views

Combine and Query 2 Child object to a Parent Object

I was wondering can you combine 2 child objects to a parent object. SELECT SourceIp FROM LoginHistory WHERE UserId IN (SELECT Id FROM User) SELECT City FROM LoginGeo WHERE CreatedbyId (SELECT Id ...
0
votes
1answer
123 views

Bubbling up an Account hierarchy to capture top most Parent Id from query

Based on some of the answers I've browsed I think this might involve 2 queries. I feel like this is probably a pretty common problem so I was hoping someone would have a quick answer or at least be ...
0
votes
1answer
56 views

Result of a soql parent to child soql request

I would want to know how I can display the result from a soql child to parent request? My request is: $query = "SELECT FirstName, LastName, (select Retreat_Booking__c.Retreat__c from ...
5
votes
1answer
123 views

Prevent New Child Record without triggers

I am trying to find the best method, that will work both in classic and lightning, to prevent a user from creating a more than 1 child record from a parent object; e.g pressing 'New' on a related list....
0
votes
1answer
131 views

Copy field from child to parent

Can you help me, on how to continue copying from Participant to Account wherein fields are the Year and Goal, I am struggling in last part which is the year and goal this is as follows child is ...
0
votes
1answer
578 views

Finding records of an object type that has any attachment

I need to find whether records of a object type have any attachment on them or not. I see that below query doesn't work. SELECT Id, ParentId FROM Attachment WHERE ParentId like '001%' . Is there a ...
1
vote
1answer
27 views

SOQL - For Loop upon childrens, nothing fetched

I'm having trouble fetching courses__c from the Certification__c object (who is the mother). The code works, for the certifications : I fetch only but every Certification__c that have related Courses....
0
votes
1answer
111 views

parent to child soql not working

i am at a wits end, any help greatly appreciated I have a child object named acf_address__c , that is a child of the contact object the child relationship name on the acf_address__c is called ...
0
votes
1answer
65 views

Custom Report Type with Multiple Parents?

Is there any way to build a custom report type that links to multiple parent object types? For example, my Opportunity links to a Contact and to an Account directly, but I can't figure out how to join ...
0
votes
1answer
34 views

Need list of specific contacts from account in custom object list view. How to set this up?

We are set up where there is an account, and a 5-10 contacts that are related to the given account (they show up in the contact listview) and there is a custom object called proposals under contact. ...
-1
votes
1answer
57 views

How to update parent object field with the difference of the child object field value

I have a trigger on child object which updates the parent Obj field 'Qtyremaining' when there is a value in the child obj field 'Invoice_Quantity__c'. So the value of Parent "Qtyremaining = quantity -...
0
votes
2answers
1k views

Process to update parent account when child record changes

I have to update a Contact lookup field (Current_PC__c) in Account object when a field (National_Member_Primary__c) in Contact object changes. I have created a process for this however it is not ...
0
votes
2answers
75 views

How to populate owner name instead of id from a child object

Here i am trying to get owner name value from child object incident , OwnerId is populating correctly but when i tried with Owner.Name, value is coming null in debug log. Please find my piece of code ...
1
vote
1answer
753 views

Updating parent component record name from child sub-component edit via event

onites. I have encountered an issue with updating a record from a child sub-component. The parent component passes the attribute when it instantiates the child component but whenever there is an edit ...
0
votes
1answer
352 views

can control child record picklist value show hide based on parent record type

Case (parent object) Details Summary (child Object) Relationship (Master-details) Can control child record picklist value hide based on the parent record type. On case object there are many ...
0
votes
1answer
203 views

Variable does not exist in global method - batch class

I have tried to put together a batch class to update parent Account records with credit scores.. I need to make 2 list variables public so I am able to access them in the finish global batch method, ...
0
votes
1answer
51 views

Creating test data for custom parent object and child object in test class

I am writing test class where I need to create test data for standard case object object and parent object for a custom field in case object. When I do the test run it is giving error at the ...
0
votes
2answers
67 views

For Loop within For Loop.How to avoid such situation?

For Loop within For Loop.How to avoid such situation: I have a requirement where I am updating Parent Object(NCR__c) Status Value based on the Status of Child object(NCR_Task__c) Value. Scenario 1: ...
0
votes
1answer
1k views

Multiple Sub Query using child parent relationship

Consider in my basket, I have a package (Main Product-just a holder) which will have 2 standalone products (child) and again the standalone products will have child products (Grand Parent). All these ...
3
votes
1answer
228 views

SOQL distance of a parent field not working

I am opening this question after reading this: Access DISTANCE SOQL Result in Visualforce I have this query [SELECT id, DISTANCE(some_field__c, GEOLOCATION(0,0), 'mi') distance FROM Parent__c LIMIT 1]...