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.

Filter by
Sorted by
Tagged with
1
vote
0answers
24 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
1answer
26 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
1answer
35 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
2answers
36 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 ...
0
votes
0answers
60 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
25 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
113 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
38 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
39 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
27 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
49 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
52 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
162 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
35 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
46 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
61 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
27 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
21 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
234 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
121 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
161 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
70 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
123 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
571 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
51 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
27 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
79 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
54 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
429 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
68 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
51 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
377 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
855 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
374 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
468 views

Does Salesforce Shield Field Audit trail allow field history tracking on detail objects in master details [closed]

Need to know about field audit trail, Salesforce shield.
-2
votes
1answer
24 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
142 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
647 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
104 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
827 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
763 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
627 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
83 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
188 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
368 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
197 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 ...