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
votes
0answers
18 views

Creating Rollup summary via junction object

Goal: Create a rollup summary field that sums related obj2's total__c (currency field) up to ojb1. Problem: There are hundreds of obj2 records already in the org so I cannot simply create a master-...
1
vote
0answers
30 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
1answer
16 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
1answer
29 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 ...
2
votes
1answer
43 views

Apex Test Class: Populate parent relationship in a Master-Detail

I have the following code in a test class parent__c parent = new parent__c(); insert parent; child__c child = new child__c(); child.parent__c = parent.Id; insert child; In the DataBase, the ...
0
votes
0answers
17 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
1answer
41 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 ...
2
votes
0answers
51 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
29 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
62 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
57 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
62 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
31 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
152 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
52 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
48 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
71 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
60 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
56 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
321 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
38 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
24 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
45 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
68 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
84 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
34 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
22 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
268 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
158 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
178 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
83 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
133 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
982 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
44 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
57 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
28 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
84 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
55 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
524 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 ...
3
votes
1answer
473 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 ...
7
votes
2answers
1k 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
459 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
582 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
163 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
35 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
716 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
116 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
855 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
883 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: