Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
44 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
1answer
20 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: ...
2
votes
2answers
96 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
2answers
34 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(...
3
votes
1answer
33 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
0answers
24 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
1answer
42 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
1answer
50 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
2answers
69 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
1answer
36 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
1answer
23 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
2answers
33 views

ChildId not available when passing Set Flow Variable from Process Builder to FLOW

BACKGROUND I have two objects in a master-detail relationship. One is Parent, the other is Child. I have a Process Builder Flow that starts when a Parent record is created or edited. I have criteria ...
0
votes
2answers
35 views

Trying to insert to 2 different custom objects which is in a master-detail relationship

I am trying to use the DML statement to make an insert to the parent and child tables all at once. I have got it to this point so far, I am not sure how to link the child to the parent when doing the ...
0
votes
1answer
43 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) ...
1
vote
1answer
21 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. ...
0
votes
2answers
20 views

Partial deletion in master detail relationship

In a master-detail relationship, if I am deleting the parent record,lets assume half of its child records were deleted after which I was getting some exception and the remaining child records were not ...
2
votes
3answers
173 views

Converting lookup relationship into master detail relationship

I had converted lookup relationship into master detail for a child object which contains lakhs of records. So when a parent record is deleted, all these child records has to be deleted automatically ...
5
votes
1answer
88 views

Is it still not possible to get the Related List Label of Lookup fields via APEX?

We wrote a custom deduplication and merge tool allowing us to overcome the Salesforce limitation only to get the deduplication UI only for a few objects. Our tool needs to work on ANY SObject (custom +...
0
votes
1answer
151 views

Count the number of details in master-detail relationship

How can I count the number of details in master-detail relationship? Let us suppose I have Detail_Type__c and Master_Type__c. Now if I have and Id of a Master_Type__c record I can do the following ...
0
votes
1answer
52 views

Opportunity and Account Relationships

We know that deleting the Account deletes the related opportunities(considering Master details relationships). However, if I delete an opportunity related to Account, will it cause the update of its ...
1
vote
1answer
116 views

Master-Detail relationship questions

I have 2 questions when it comes to master detail. We all know the detail object inherits its sharing from the master. But what about CRUD and FLS? My guess is that those are still separate but I am ...
0
votes
3answers
371 views

The number of Lookup relationship that an object can have are as in today?

The number of Lookup relationship that an object can have are as in today ?
0
votes
1answer
41 views

What is the best way to query a lookup on a Master object in Apex?

I am trying to create a Trigger on an object 'Education History' and the trigger is supposed to check if an 'Affiliation' record already exists based on comparing two fields and update that ...
1
vote
0answers
40 views

Auto populate Account name on child object while click on “Save & New” standard button

I have created a custom object and created a Master-details lookup field to Account. While creating new records, there is an issue. When I click on New button, fill in all the fields and click on "...
1
vote
2answers
25 views

Calculating grand total of child object's field

public static List <Pricing_Lookup__c> getGrandTotal(){ List<Pricing_Lookup__c> calculateTotal = [Select Name, (Select Name, Unit_Price__c From Activity_Lookup__r) From ...
0
votes
1answer
75 views

Need help writing query for 3 custom objects in master detail relationship

I'm trying to create a table on Visualforce page like this. Each pricelookup's description has it's own activity and purchase info. Custom parent object - Pricing_Lookup__c Custom child object - ...
1
vote
1answer
53 views

Unable to pass Master-detail id while creating multiple records using ng-repeat

I have a use case where I have to display some fields on visualforce page and then whatever data user provides on the page, grab the data and create a record out if it. Now the record needs to be ...
0
votes
1answer
334 views

Child record's record type based on Parent record's record type [closed]

Objects: Account, Opportunity Record Types: Account --> A, B Record Types: Opportunity --> a, b When creating an Opportunity I'm trying to setup an opportunity record type/page layout that will ...
0
votes
0answers
53 views

Possible to default the value of a master-detail field on a custom object record within the browser UI?

I am building a custom object that is a detail of the Account object, but it also has a lookup to an Opportunity and I'd like our users to create new records of this object from the Opportunity ...
0
votes
0answers
48 views

Test Roll-Up Summary field with MIN Decimal for Data calculating

I tried everything in this test and I really don't know, how to do that right. It's 3 Objects: A has a Number (Decimal) field. B has a Lookup field to A, Master-Detail to C and Number field for ...
3
votes
1answer
290 views

Deleting Custom Objects

I have three connected Custom Object I'm trying to delete. When I attempt to delete them, I get the following message. 'Your attempt to delete .... could not be completed because it is associated ...
5
votes
2answers
661 views

Cannot set sharingModel to ReadWrite on a CustomObject with a MasterDetail relationship field

Has anybody bumped into this error when spinning a new scratch org? Here's how this happened. I created a new scratch org and created 2 objects. One had a lookup field to the other. Then I pulled ...
0
votes
2answers
311 views

Data Loading into Master Detail relationship objects

I have a scnario which I am not able to get through. I have two objects, Obj A and Obj B, both related through Master-Detail relation with Obj A being Master. Now, I have some records to be inserted ...
0
votes
1answer
385 views
-2
votes
1answer
23 views

Why I am not getting values in my page?

below is my class, Can you help where i am going wrong, I am not getting values in my page public class DeleteFlag { public Property__c prop{get; set;} Public Unit__c unts{get;set;} public List<...
0
votes
0answers
127 views

Can we get prior value of Parent record in process builder with child as the object?

I have a list of salesforce task copied as records in an object called AdmissionSteps. I have another object called Student. I have created a process builder with AdmissionSteps as the object. In ...
3
votes
1answer
34 views

URL Hacking - Trying to incorporate a unique count at the end of a pre-populated field

Created a URL that works fine, but I'm looking to add a count at the end of the Record name. For example: (Account Name) "Scorecard" {Count Field on Opp} + 1 Here is the URL: /a0L/e?&retURL={!...
0
votes
1answer
564 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
1answer
94 views

Unable to create a Master-detail link on Campaign Member

I have a scenario where I have to roll up the count of active campaigns that a contact is enrolled in. To achieve this, I tried to create a master-detail on the Campaign Member to the contact. But I ...
3
votes
2answers
797 views

Summer18: Test only deployment cannot insert a new Master-Detail field

Today SF has just pushed Summer18 (api version 43) to our sandboxes. And now when our CI process is trying to validate code from branch against empty SF org, it throws bunch of same error messages ...
0
votes
2answers
647 views

Salesforce data design tool [closed]

I am looking for design tool to draw salesforce data design. I have tried Power Point and Visio but I like this design:
1
vote
1answer
553 views

Inserting Child Records with Master-Detail Relationships

I'm allowing a user to upload multiple files for accounts, contacts, and trades. Contact looks up to Accounts via a lookup field while trades look up to accounts via a master-detail relationship. I'...
0
votes
1answer
69 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:...
3
votes
1answer
171 views

Cannot use Master-Detail type with Salesforce-DX

I seem to be unable to create a custom field of the master-detail type. Because each time I create one and try to push it to another scratch org I get this error message :  Cannot set sharingModel to ...
0
votes
1answer
276 views

Sharing rule on Detail object

Lets take we have 2 objects 'Invoice' and 'InvoiceLineItems'. Both are in Master Detail relationship. At OWD Level i kept the Private for Invoice. We have a requirement as follows. I want to ...
0
votes
2answers
169 views

How to check if a child object is null in Javascript Button?

I'm creating a javascript button on the Quote object that would redirect to a link in another window. I only want to redirect to this other window, if there's a child under the record. For this ...
0
votes
1answer
43 views

Child records fields editable if parent is read only for profile

I have one object - A ( Custom Object) is the master to object B ( Child Object). A is set to read only for P (profile). A is from managed package which was installed by one vendor. Is there any ...
5
votes
1answer
396 views

“Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail” on an “sfdx force:source:push”

Been getting the error: Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail this morning when editing/adding fields to some custom objects that are in a master-...
1
vote
2answers
3k views

Master-detail relationship between standard objects [closed]

Is there any master detail relationship between standard objects? If not, then why there is no master detail relationship between them? I am unable to find such relation between them.
4
votes
1answer
376 views

How to refer to an existing record in REST API composite JSON?

When using REST API composite JSON, how to refer with external id an existing record to existing Master-Detail parent from a newly created child We have the following objects: Organization__c: Has ...