Questions tagged [master-detail]
This type of relationship closely links objects together such that the master record controls certain behaviors of the detail and subdetail record.
410
questions
0
votes
2
answers
564
views
how to update parent field from child
I got 2 objects Service_Request__c(Parent) and Service_Line__c(Child). I'm trying to do is update a field of parent object from child.based on the following condition.
In the following code, I'm not ...
0
votes
1
answer
984
views
Mass upsert Master Detail records at the same time
I have two custom objects with Master Detail relationship. I need to be able to bulk upsert these records simultaneously. For example:
If the master records don't exist, create them. Otherwise, ...
0
votes
0
answers
336
views
Master-Detail Relationship - Process Builder
I have a Custom Object = A, another Custom Object = B in a master detail relationship and the Account Object.
I want to be able to make checkbox = true on the Account, depending on some criteria on ...
0
votes
1
answer
839
views
Insert related record to account when field is matched with child record
I have a custom object named Merged_Account__c which has lookup to Account object.
This child object has name field and it has similar values as that of Account name field. Now, when the name fields ...
0
votes
1
answer
2k
views
Field Not Writable - Master field on Child object
I have the below functionality inside a for loop, the highlighted field is a master field in the child object that is populated in this piece. For the first iteration it populated the value but the ...
2
votes
2
answers
2k
views
If I convert master-detail relationship to lookup relationship will there be any data loss?
We are planning to convert an existing Master-Detail relationship to lookup relations. I wanted to know if there will be loss of existing association when the field type is changed from M-D to lookup. ...
0
votes
1
answer
1k
views
After Deleting Parent Object in Master-Detail relation, what happens to the triggers we have created in child object
In a master detail relationship in child object if we created trigger on child object after delete.when parent is deleted will the trigger execute?
0
votes
1
answer
544
views
formula field on master record that displays a text field on the max child record
I have a custom object, Recoveries Placement, related to the Case object in a master-detail relationship.
I need to surface a text field from the MAX Recoveries Placement record on the Case layout. ...
1
vote
0
answers
626
views
Joined Reports with 2 unrelated child objects
I'm trying to create a joined report with a custom object (object A) as the base. It is the Master in two Master-Detail relationships (Object B and Object C). Object B and Object C are NOT related.
...
0
votes
2
answers
105
views
Mobile SDK SmartSync SFParentChildrenSyncUpTarget INVALID_FIELD_FOR_INSERT_UPDATE fields = OpportunityId
Using Salesforce Mobile SDK 7.2 for iOS with Swift 5. Attempting to syncUp an Opportunity Line Item that has been updated on the device results in the error:
errorCode = "...
1
vote
1
answer
3k
views
Lookup Filter with related fields that are more than one relationship away from the lookup object
I want to add a lookup filter for the lookup between Package Version and Release. So I just can choose Releases which are linked to the same Program as my related Package.
This is not possible ...
0
votes
0
answers
157
views
Update checkbox on the father object depending on the child values - with a trigger
I need to update the 'Is Cloud Customer' check box in the account object when at least one of the Child's as the Installation type field containing the word 'Cloud'.
If none of the Child as 'Cloud' ...
7
votes
1
answer
2k
views
Does Lookup Skew affect only master-detail relationships or also lookup ones?
I've been encountering and reading a lot about data skew issues, particularly lookup skew, and I've noticed that most information I've found doesn't explicitly indicate whether this affects master-...
0
votes
0
answers
360
views
Joined reports with master-detail relationship
I'm having problems trying to make a report of some custom objects, they're arranged like this:
A (detail) <-- B (master) --> C (detail of B)(master of D) --> D (detail)
Any ideas of how to get ...
0
votes
1
answer
2k
views
How to loop over child objects of master object in batch object
I have a batch process to update Accounts with address info from the Cust_Address__c object. I use a Junc_Account_Address__c object as a junction. How do I loop through the accounts to update the ...
1
vote
2
answers
97
views
Question regarding soql many to many relation update
I have a many to many relation. Account obj, AccountAdress junction, Adres obj. The junction object has a startdate an enddate to make an address active for an Account.
I want to use a batch process ...
1
vote
1
answer
3k
views
Filter By Owner in list views Not working
I am facing this issue and I can't seem to find any solution. I have a custom object, Subscription
and I want to control the list views. If I create a list view with All Subsctiption Details, I can ...
0
votes
1
answer
439
views
update all child record when parent record is updated
I have created trigger on parent object (Vendor__c) to update child records(Transaction__c).
Logic : when the Vendor Manager field is updated on a Vendor record, look for Transaction records ...
8
votes
2
answers
27k
views
Is it possible to convert a Master-Detail relationship to a Lookup?
I'm going through the Trailhead training (here), and see the following two snippets which seem to disagree:
"It’s possible to change a lookup relationship to a master-detail
relationship, but not ...
1
vote
1
answer
384
views
Master-Detail Relationship causing problems with creating Related Records
We have a custom object to log our Activities with Customers. Until very recently, it had a lookup to that account. To better serve our reporting needs, I changed that lookup to a master-detail. Now, ...
0
votes
1
answer
568
views
I can't convert my Master-Detail field to a Lookup field because the Change Field Type button is not visible
I have deleted all Roll-up Summary fields in the Master object including those in the Deleted Fields but the Change Field Type button is still not showing. Do you have any idea what I can do?
2
votes
1
answer
1k
views
Working round the lack of formula fields of type "Lookup Relationship"
When you have a master-detail chain of objects several levels deep, sometimes a lookup field to the root object on each child object is helpful for easy navigation or to show deeper records than the ...
1
vote
2
answers
2k
views
trigger to update field on parent object based on field in child record
so i have 2 custom objects, rep and role history. rep is the master and role history is the detail. rep has a field "rep type" that needs to be systematically updated to reflect whatever is in the "...
0
votes
0
answers
578
views
Error on inserting Child record of Master Detail Relationship
Error on inserting Child record on custom object which is having Master Detail relationship with other Custom Object.
I have two custom Objects x and Y which are in Master Details Relations. There ...
1
vote
0
answers
2k
views
How to use the wire service to get field from child Object? [duplicate]
This seems to be pretty simple but I kinda lost right now. I want to create a LWC based on two custom objects which has a master-detail relationship.
I have a 'master' object Product__c
Name
Id
etc
...
0
votes
1
answer
845
views
How to Access field from Detail object in Master object?
I have a customer object as master and Document object as Detail which has a Status__c field. Since its a Master-Detail there can be multiple Documents to the custom object.
I want to maintain a ...
1
vote
1
answer
1k
views
Sharing Setting on MAster Detail Field is not being enforced - Bug or correct SF behaviour
There are two Objects 'Parent' and 'Child'.
Two User Admin and LocalUser.
As per the profile of LocalUser :
Parent Object has Read permission
Child Object Has CRU permission
OWD for Parent Object is ...
0
votes
1
answer
88
views
How can I change this method to query my master detail object?
I am new to Apex trying to do some practice assignments and have gotten stuck on this junction object query.
Task: Edit the current getUser() method to do the following:
Return a custom object (that ...
0
votes
0
answers
20
views
How can I return a Custom Object with a List of Parent Data from querying the Junction Object? [duplicate]
I am new to Apex trying to do some practice assignments and have gotten stuck on this junction object query.
Task:
Edit the current getUser() method to do the following:
Return a custom object (that ...
0
votes
1
answer
905
views
Can a master-detail relationship be added to an object deployed in managed package?
I have been trying to find out how adding a new master-detail field to a released object (Object released in SF Managed Package), would impact the upgrade process.
As far as adding master-detail ...
2
votes
0
answers
511
views
LWC: Master-detail field default value in Lightning-record-form
Is there a way to assign default value for record's master-detail field on LWC component "lightning-record-form" ?
0
votes
1
answer
1k
views
Update a master-detail lookup using a before trigger and the name of the parent record which is a concatenation of fields on the child record?
I have two objects - Customer Visit Quota and Contact Report. The contact report object has a "Number of Visits Field" that should roll up on the Customer Visit Quota. I have a master detail look up ...
1
vote
1
answer
3k
views
How can I link two records in a flow?
I'm creating a flow that creates two records on two separate objects. The objects are linked in a master-details relationship. But I cannot figure out how to create the relationship between the two ...
0
votes
2
answers
2k
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 ...
7
votes
1
answer
6k
views
Why can't Leads or Users be Masters in a Master-Detail relationship
I ask this both out of curiosity, and if I wanted to create an object that I wanted to act as a child to one of those objects I would have a better idea how I could do that. Let's say for example ...
0
votes
0
answers
150
views
How master-detail records are synchronized/accessible in junction object?
I have a Juction object CaseJiraItemAssociation__c which is have two master-detail relationship (on Case__c and JiraItem__c custom objects) and I have one outbound message (end point) on JiraItem__c ...
2
votes
1
answer
633
views
How to update child in Master-Detail relationship with REST API?
I have a Master-Detail relationship with Accounts and Locations.
I am able to create the child using upsert, but when I try to update the Account__c field I get
(INVALID_FIELD_FOR_INSERT_UPDATE: ...
4
votes
2
answers
4k
views
Illegal assignment from sObject to Id
I'm trying to insert two master-detail lists at the same time. I'm looking through Bob Buzzard's blog post: http://bobbuzzard.blogspot.com/2012/03/create-parent-and-child-records-in-one.html Where he ...
0
votes
2
answers
2k
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(...
5
votes
1
answer
1k
views
Does adding a detail record cause an update event on the master record?
Background
I have a master-detail relationship between two objects, let's call them:
parent__c
child__c
Once the parent__c record is in a certain status__c we block any changes using a before ...
1
vote
0
answers
484
views
Process builder update other child records except himself
I have a process builder, which is triggered by a child object, Asset. As an action I want it to update other child records for the same parent Account. But it should update all related Asset records ...
0
votes
1
answer
1k
views
parent to child record changes using trigger [duplicate]
I have trigger on parent object which is used to update field Status of child object, I want to update child object's status field to Tested only if previous values is "ready for testing". And once ...
0
votes
1
answer
318
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
2
answers
3k
views
If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name
I'm having trouble putting together a SOQL query.
Basically i have a parent object (Opportunity), with multiple child objects (Borrower_Pair__c). The relationship from the child to parent is created ...
0
votes
1
answer
52
views
How do i access child fields.Below is the code
trigger ProcdureTrigger on Test1105__Procedure__c (before update) {
public map<Test1105__Procedure__c,List<Test1105__Procedure_product__c>> accountContactMap = new map<...
0
votes
1
answer
83
views
How does joining two custom objects into one custom object through master-detail relationship work
I've been working on a test method but I've had a problem creating the setup of it.
public static List<Job_Posting__c> createPostings(){
List<Job_Posting__c> testPostings = new ...
0
votes
1
answer
629
views
How to establish One to Many relationship using Apex
I am building an app which reads information from an external API and then populates data in my App for further processing. I have two kinds of custom objects for this. First kind (e.g., Profile) ...
5
votes
3
answers
6k
views
How do you use an external ID in the import wizard to import child objects of a master/detail relationship?
OK, I need to import a few thousand records and import wizard seemed like a good choice. First I did some accounts - that went smoothly. Next I went to import some custom objects that have a master/...
1
vote
1
answer
651
views
What objects cannot be masters in master detail relationships?
I have the following objects Training_Group_Criteria__c and Training_Group_Rule__c. I am trying to create a master-detail field to make Training_Group_Rule__c a detail of Training_Group_Criteria__c. ...
3
votes
1
answer
3k
views
roll up summary field on account related to opportunity
As we know, a rollUpSummary field can be created on the master object of a master-detail relationship.
the relationship b/w account and opportunity are look up, then how it is possible to create a ...