Questions tagged [childrecords]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
50 views

Find Parent Event Id from Child Event and Display Relationship to End-User or Redirect to Parent Event?

This question has been asked a few times before, but I've been unable to find a question that had an answer that actually led to the goal of finding a Parent Event from a child event. Here ...
0
votes
0answers
20 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
1answer
23 views

Access Parent object's field in Child object using formula field

I have a Account Test1 with Address Line 1, City and State. I have another Account Test2 with Address Line1. Test1 is the parent of Test2. In Case object, i have a field where I am populating value ...
0
votes
1answer
29 views

Concatenate related contact names in a flow

I have a junction called MeetingContactRelation to link attendees to a meeting: Meeting - MeetingContactRelation - Contact I have a hidden rich text field on Meeting and want to store the ...
-1
votes
1answer
28 views

Code not executing in child aggregagtor

I can't understand why I am not getting my debugs in here-- my code is for(AGR_Agreement__c agr:newAgr){ for(Account acc:agr.Accounts__r){ system.debug('MVK '+agr.AMS_Agreement__c); ...
0
votes
1answer
32 views

Overwrite a related list for an sObject inside a Map without looping?

Question: Salesforce allows me to write specific field values to specific related list records on an object in a Map by referencing the __r[Index] relationship of that particular record. However, it ...
-2
votes
1answer
47 views

how to aviod soql query in the loop , i have to get get child data in my method

I have 2 object object1 and object 2(related object) ,,,i wrote trigger on object1 when object 1 record gets created user record should get created.. i stored profile perssion set information in ...
0
votes
1answer
54 views

process builder multiple __r fields

I am trying to use the process builder to update a child record. The child object called CustomerOfTheWeek, has multiple lookups to Account (for various customers, like the 1st customer, the 2nd ...
0
votes
1answer
30 views

Trigger to Update a Parent Record based on a value in a child record

I need to update the Order record when it's status changes to Activated. I want to set the custom field, invoice_Due_date__c based on a related record's value. The related record is child record in ...
0
votes
1answer
262 views

Clean way to default child record values from parent record in Lightning Experience?

A customer is asking that a status field on a child record be defaulted to a value from a parent record when the "New" button is used on the "Related" tab of the parent record. Can this be ...
0
votes
1answer
481 views

LookUp selected record not showing in related List

I hope this is a good Monday for ya'll! I have two objects, RFQ (master) and RFQ Lines (Children), I'm showing all related children on the master page using the Related List provided by the page ...
0
votes
2answers
355 views

Update Parent when all children have the same field

How can I update the parent when all child records have the same value in a field? Ex. I have five child records under a parent record. The five child records have a field called Status, if ALL of ...
1
vote
1answer
510 views

Cant do null check in sub query record

I have done a parent parent to child query List<Opportunity> opportunityList = [SELECT Id, Field__c, (SELECT Account__c,Contact__c,CreatedDate, LastModifiedDate, Description__c,Id,Note_Type__c,...
1
vote
1answer
195 views

SOQL Order By field in child relationship

I'm trying to use SOQL (with JSForce in a nodejs app) to execute a query like what is below. SELECT Name, Oppnum__c, Id, ( SELECT CreatedDate FROM Times__r ORDER BY CreatedDate DESC LIMIT 1) FROM ...
1
vote
2answers
332 views

How to get first index nr/record in child loop

I have some related records to a parent record. I want to loop trough the child records and set a checkbox on the first record/index to true and all the other records to false. How do I achieve this? ...
0
votes
1answer
762 views

Process Builder creating detail records not updating master field in child records

I have a custom object called AppDoc__c which has a master-detail relationship with Case. I have a process builder on case which creates 3-records of AppDoc__c everytime a new case is created. Value ...
0
votes
3answers
189 views

SOQL - Use the size of the list of inner child query in the WHERE clause

I was trying something like along those lines but it's not working: SELECT Id ( SELECT Id FROM Orders WHERE Custom_Field__c = '...
0
votes
1answer
102 views

reference in visualforce the lookup field on child record in master detail

<apex:pageBlockTable value="{!oldSubscriptionAndAsset}" var="assetAndSubs"> <apex:column> <apex:facet name="header">Asset</apex:facet> <apex:...
0
votes
1answer
350 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 ...
2
votes
1answer
61 views

Accessing Payments on an Opportunity

This has been the holy grail of my coding for too long, so finally asking here. I'm attempting to show payment information on a page that uses an Opportunity Controller. I know I have to call the ...
0
votes
2answers
348 views

Apex Trigger to Update a Lookup Field on a custom object with a custom object related record

I have a custom object called Inspection__c, which is a child object of the Account object. The Account object has another child object called Monthly_Quota__c, each Account has 12 records of this (...
0
votes
1answer
64 views

Apex novice - need help with test class (trigger works great in sandbox)

I get this error message when I try to deoploy via change set: "Code Coverage Failure The following triggers have 0% code coverage. Each trigger must have at least 1% code coverage. ...
0
votes
3answers
558 views

Test class for a trigger in which I am updating child record

Yeah this might be a simple question. As I am a beginner, I would like to know how to cover 100% code coverage for the below small trigger. Trigger: trigger UpdateChildRecord on Account (before ...
1
vote
1answer
148 views

How can I update Child records from list of Parent Records in custom controller?

I have a custom controller with a list of parent records (opportunities) and a list of their child records (opportunitylineitems). I want to save both the parent fields and child fields with one ...
0
votes
1answer
109 views

SOQL Query to compare dates on child object records

I need to run a query to compare dates on child objects. We have a custom object Job Placements (child of Contacts) with Start Date and End Date fields. I need to find all Job Placements where the ...
0
votes
1answer
1k views

Insert Parent and multiple child record with same vf page

My query is when I input account details after that input contact detail and click on the save button its not save given error is Insert failed. First exception on row 0; first error: ...
0
votes
1answer
492 views

Pull formula field from opportunity to account

I have a formula field on opportunities that calculates the Tier/Importance of an opportunity by looking at 'product purchased' and 'no. of licences purchased'. I'm now trying to find a way to pull ...
1
vote
1answer
182 views

Fetch multiple records for same object

I have been doing a lot of research and haven't found an answer that suits my needs yet and would greatly appreciate any input. I am interested in creating an email template (most likely visualforce ...
0
votes
1answer
660 views

Copy values to child Object from Main object

I am looking for an option to copy fields from Main Object to Child Object, when lookup is selected: Also when i edit field 1,2,3,4 from Child Object i want to copy that value in Main Object field 1,...
0
votes
1answer
154 views

selected account(parent) name from select option,show its related child(contact obj) on vfpage

using selectoption my all account name fetched if i select anyone account name in that dropdownlist show releated contact(child record) on vfpage error showing that list has no rows ----------------...
0
votes
2answers
609 views

I cannot create child object to junction object

I have a junction object(JuncObj) with a custom object(ParentObj1) and contact as the masters. I've created a separate obj(NewChildObj) that is supposed to be a child object of JuncObj. When I create ...
0
votes
1answer
628 views

Create child records for parent created on same batch class

I have below code where I am creating parent object records in a batch class. I need to create the child records of the same on same batch class. Can someone please suggest a way out for this? Apex ...
1
vote
3answers
459 views

Fecthing records from unrelated objects, But commonly have parent object

we have relationship between account and contact. I specially created a child object called Product to Account by using Lookup relationship. Now Account have two child. But Contact and Product ...
2
votes
1answer
844 views

Insert Parent and Child Objects of One Type within One DML statement

I want to insert Parent and Child Accounts in one DML statement. I know it can be done for related Contact/Account objects using External Id field, but it doesn't work in my case. Running the ...
0
votes
1answer
81 views

Fetch child account name from parent

Estimate is the parent and it has Bid Request as a child. In Bid request there is a field "Name" Above the "Bid Estimate" field, display the selected Contractor's name that is associated to the ...
3
votes
2answers
621 views

Visual Workflow or Flow, Child Record's Related Record Reference

I am brand new to Flow and I need to create a decision element based on criteria from a child record’s related records, or more specifically, from the Opportunity\Opportunity Line Items\Product2 field ...
1
vote
1answer
4k views

Process Builder Update Parent (lookup) Record Field

I simply want to update a field via a Lookup. Object Customer Master has a lookup to standard object Account (CM is a related list on the Account layouts as well). I have a custom Lookup field on ...
0
votes
0answers
47 views

Associate existing related record to an record when created

I am trying to associate an existing related record(sales rebate__c) to another custom object when it is created(Sales program__c) Below is what I have so far but I am receiving an error where I am ...
1
vote
1answer
586 views

Create child record using flow

I have a parent object of Project and a child object of Project Notes. I want to create a Project Note using a screen element inside a flow. I will have a button on the Project record to initiate ...
0
votes
1answer
506 views

How to prevent firing triggers by roll up summary fields

I have some roll up summary fields on parent object(account) to a child object (opportunities). When I make any changes on opportunities, roll up summary fields are automatically updated, and it fires ...
2
votes
1answer
572 views

Didn't Understand Relationship - How To Find Child Relationship Name?

I have a many-to many relationship between three objects. LGFProducts, PartsinProducts, and Parts. PartsinProducts is the junction object. I want to be able to get data like the names of the parts ...
2
votes
1answer
398 views

Count Child Objects, change field for each object after the first

Is it possible to count the number of child objects and specify a field to be "X" if it is the secondary, tertiary(etc) object tied to the parent, without using a trigger?
2
votes
1answer
1k views

Visual Flow - Count number of child records

I need to count the number of Assets per Account, in a roll-up summary field. My criteria is: Every time an Asset is created /updated, count number of Assets and store in field 'Number of Assets'. I ...
0
votes
1answer
34 views

Trigger to update parent field with custom object data not populating

I hope everyone is doing well. I'm new to SalesForce and have been trying to learn Apex for a few weeks without much headway. Our org has a custom object called Factor Data that is a related list at ...
2
votes
2answers
841 views

How to create more than one temporary record with lightning components

Dear fellow Salesforce experts, I am building a lightning component where I am using a form with fields in order to create multiple records. I am already able to create multiple opportunity records ...
2
votes
2answers
2k views

How to trigger max value of field from multiple child objects onto parent account?

At my org, we have FICO scores for each contact in an account. Some accounts have multiple contacts, while others have one. I am trying to pull the highest contact FICO Credit Score into a custom ...
0
votes
2answers
531 views

Report Criteria for Parent Child

I have a parent child objects (just lookup relationship). Can I get a report with All Parents who do not have at least 1 Child in Active Status? This is to identify any Parents who do have an ...
5
votes
2answers
2k views

Accessing grandparent through SOQL

I'm trying to access a grandparent record through a SOQL query and am having some trouble. From my understanding, you can go 5 levels deep with a child-to-parent relationship in a query, so I don't ...
0
votes
1answer
53 views

How to Set Valid Lookup?

I am in the process of validating a trigger that invokes a class that will perform calculations on a child object. I keep getting the error below. I know how to fix the error but when I add the ...
1
vote
0answers
57 views

Child relation is 'not a column" in Javascript Remoting

I'm running in to an issue where an object fetched from Salesforce through JS remoting is not able to be sent back because it has a relation field. This is the setup: A function retrieves a wrapper ...