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
1 answer
61 views

How many LookUp and Master Detail Relationships we can create on a single object?

I have came through various articles saying that we create 25 or 40 Lookup relationships on an object but in my org it is showing relationship limit as 50.Can anyone confirm the right number?
Hira Khan's user avatar
0 votes
1 answer
49 views

FATAL_ERROR System.SObjectException: Field is not writeable: Monthly_Finance__c.Project__c

public with sharing class CSVController { @AuraEnabled public static string loadCSVData(Id contentDocumentId, string fileType){ ContentVersion contentVersionObj = [ SELECT Id, ...
utkarsh singh's user avatar
0 votes
0 answers
59 views

Master-Detail relation to ContentVersion object

I'm currently considering the implementation of a solution and I would like to ask for your advice. The initial requirement is to establish a one-to-many relationship with the ContentVersion object (...
PANICORE's user avatar
-1 votes
2 answers
203 views

Updating a field in Child Object from a parent object only while created

I have a formula field in Child object which is concatenated with Parent Object field value. Whenever I create a new Child record, the field gets populated correctly. I don't want the child record ...
Aman's user avatar
  • 1
0 votes
3 answers
513 views

Help with Data Load to Multiple object using the CSV

We currently have four custom objects in the system and there are linked. We need to do a data import and data is in the CSV like below From the csv, I need to create the Card first and then Section ...
user4912134's user avatar
0 votes
0 answers
203 views

Master Detail field on child - how to show master record subject in list

Let's say I have Master Object record A, and Child Object record B. When creating a new record on the child object, I have a Master-Detail field where they can choose the related master record. The ...
user1702965's user avatar
0 votes
0 answers
46 views

Unable to update Contact field on Candidate record

In my dev org, as part of an HR app, I've got a 'Candidate Test' object. I added a 'Contact' master-detail relationship to link the candidate to an existing Contact. I used a master-detail ...
Maria C.'s user avatar
0 votes
1 answer
135 views

Lookup's related Lookup is blank in test class, even with test data inserted

My Lookup's(MD) related lookup field is coming up as null in testclass. So I have 3 objects, lets Objects X, Y and Z Z is the detail and Y is the Master. Y has a lookup to X In the test class I am ...
Mavsav Sauve's user avatar
0 votes
0 answers
25 views

Child record looses parent relationship during upsert

I have the following data model: Two objects (parent) Affiliate Partner and (child) Affiliate Payout. The parent has an external id called Id__c and the child uses Affiliate_Partner__c field to assign ...
Kostadin Stoev's user avatar
0 votes
0 answers
276 views

Master-Detail Relationship to Quote Line Item

I have a requirement to have a child object from a Quote Line Item. The organisations security settings require objects to be Private at an Org-Wide Defaults level, and to avoid creating multiple ...
Callum MacErlich's user avatar
0 votes
1 answer
374 views

Trigger to update field on master object based on detail object field

I'm working with Opportunity object and OpportunityDetails object that have a master-detail relationship with one another. The master's api name is Opportunity and the detail's api name is ...
Tency Serah's user avatar
0 votes
1 answer
34 views

How to make search field larger for adding record in master detail relationship

we have a custom object called "Request". This has a master detail relationship with the opportunity object (we call it a grant and it is a record type on the opportunity object). When you ...
Matt Pugh's user avatar
0 votes
1 answer
112 views

Apply Id to the Detail record of the Master record in a trigger

Specifically, I'm trying to figure out the syntax to add the parent/master object id, to the child/detail record so the insert works without giving an error of malformed Id. I know the master name, ...
van Zylin's user avatar
2 votes
0 answers
297 views

How does Record locking behave in master-detail-sub-detail hierarchy?

In the ERD below all the objects are linked by MDR. If I update a record in detail 3 I understand that detail 2 would get locked. Would detail 1 and master get locked as well? How would I test this?
PartOfTheOhana's user avatar
-3 votes
1 answer
566 views

Do master-detail relationships not cascade their deletes?

I was under the impression that deleting a master record in a master detail relationship would delete the detail record automically, cascading the delete. In practice I get this error DELETE_FAILED, ...
TemporaryFix's user avatar
  • 2,897
0 votes
0 answers
70 views

want to show master & detail object s records on vfp

i m trying to show trainer deals object data & trainer master object data on sameVFP. , it is showing only training deals(details obj) data but not trainer master data.(master objt) controller: ...
gauri's user avatar
  • 1
0 votes
1 answer
2k views

If Object A is Master and Object B is Detail. OWD for Object A is private. Can you show records of Object B to User X when X is not the system admin?

I know that for Custom Objects in Master Detail relationship, the OWD for child is 'Controlled by parent'. So here as OWD for Object A is private it means that even records of Object B (child) should ...
Amax1's user avatar
  • 109
2 votes
1 answer
160 views

Why am I getting an error about recursive update in my trigger when I add a rollup summary field?

I have a trigger on a parent object that manages master detail child records. This trigger needs to check a given flag field on the parent record to determine whether it needs to process the child ...
Phil W's user avatar
  • 34.3k
1 vote
1 answer
231 views

How do I test record locking?

Say I want to prove to myself that when I delete a detail record, the master record is locked. How would I do that?
PartOfTheOhana's user avatar
0 votes
1 answer
211 views

How to insert a record and input values from the master/parent information

I have a custom object named "Property Booking" where if the status changed to approved I have to create a record for my "Quotation" custom object. The tricky part here for me is I ...
Kejer's user avatar
  • 31
0 votes
2 answers
576 views

Create Master-Detail Object via Rest-API

I have created a custom object which is connected to the Account Object via Master-Detail. The custom object stores reviews for the Accounts. The reviews are given on a website and saved via REST API. ...
Fewture's user avatar
0 votes
1 answer
132 views

Use field as relationship connection between objects

I am struggling with a seemingly easy task: I need to connect Account Objects with a custom object created for reviews. One Account can receive multiple reviews and they should be shown in the account ...
Fewture's user avatar
0 votes
1 answer
210 views

How do I put Salesforce child details into tabs?

My question actually comprises of two sections. I have two objects namely cases and reviews. Firstly, I want to build a one-to-one relationship between cases and reviews where cases is the parent and ...
H4shBrown's user avatar
0 votes
1 answer
722 views

Trying to insert record with master-detail relationship by external id

I have a callout which receives one master object which I map to a Case and upsert base on a field set as External Id. Inside this master object there is a list of child objects which I map to a ...
Miguel Bohrz's user avatar
1 vote
2 answers
280 views

Why am I able to delete a record of the detail object?

There are two custom objects in a Master Detail Relationship: Employees (Detail object) Projects (Master object) I built a custom profile that consists of user1, and the object level permissions for ...
Sai Pranav's user avatar
0 votes
1 answer
416 views

Not Able to Create The Master Detail Relationship Field on Invoice Object

I am facing this error.... My goal is to create the relationship between Account and Invoice Object..
Debmalya Ray's user avatar
0 votes
1 answer
595 views

How to achieve a validation on Master for child's count in Master-Detail relationship without Apex Trigger?

There is a master-detail relationship between two objects and I want to ensure that the master object should not have more than 10 child records. How can we achieve this without using a trigger ?
Pramod Hale's user avatar
1 vote
2 answers
8k views

A formula number field can't be used in rollup summary

The child object has two formula number field and when I want to create a rollup summary field on parent object, one of them is not available. What can be the reason of it?
pt_5858's user avatar
  • 45
2 votes
1 answer
1k views

Anonymous code to run a bulk update

I have three objects, namely Tests, Grant, and Grant Contracts. Here in Tests object I have given a lookup to Grant and Grant Contract. I have also given a lookup in Grant Contract to the Grant object....
JK123's user avatar
  • 69
2 votes
0 answers
301 views

Safely replace a packaged Master-Detail with Lookup

My active 1GP Managed Package app suffers from Account and Data skew (with ROW LOCKING) because we made a custom object AccountItem__c a child in a Master-Detail relation (MDR) ship with Account. As ...
Robert Sösemann's user avatar
0 votes
1 answer
2k views

Can we create Junction object with one master-detail and one lookup field?

Can we create Junction object with one master-detail and one lookup field? What will be its security configuration in case Lookup relationship field is created first?
Gunjan Shah's user avatar
0 votes
1 answer
148 views

Parent Object = Guest_Master__c , Child Object = Payment_Master__c On child object I have created master detail record of Parent Object

Parent Object = Guest_Master__c Child Object = Payment_Master__c On the child object I have created master-detail record of parent object Payer_Details__c I want to create Payment_Master__c & ...
Atharva Pasalkar's user avatar
0 votes
1 answer
775 views

How to get the parent id in a master-detail relationship and assign it to the child id

I am new to apex and I have created an apex trigger that will create new residents whenever a city census(custom object) is approved. The created residents is based on the contacts object's details ...
Jaemy Malik's user avatar
0 votes
1 answer
76 views

What does referring to a child relation of an object return?

Custom Object Maintenance_Request__c has master Detail relationship to Custom Object Vehicle__c (Child Relationship Name = Maintenance_Requests). In the Following code for(Vehicle__c veh : v){ ...
Donal Shijan's user avatar
0 votes
0 answers
23 views

Master Detail - reparenting options [duplicate]

I have a custom object Candy__c. Candy__c has an Account__c field that is a master detail to Account. I am cloning an account record and want to KEEP the old account record. Yes there will be ...
Olivia's user avatar
  • 3,431
0 votes
1 answer
209 views

How To Access Field f of an Object A to which Object B is having a master detail relationship using Object B?

I have a Custom Object called Vehicle__c which has a Master Detail Relationship with Contact.(Vehicles owned by contacts); Another Custom Object Called Maintenance_Request__c which has a Master Detail ...
Donal Shijan's user avatar
0 votes
1 answer
107 views

Create csv of children records on parent in master-detail relationship

I have a Master-Detail Relationship. Each Child record has a Name__c field. I want to create a child_names__c field on Parent that is a sorted-asc csv of of each Child's Name. Rollup-summary seems to ...
user2402616's user avatar
1 vote
1 answer
536 views

Sharing a detail object with external users

Issue I have a detail object "License" that functions as a junction object between "Software product" and "Account". "Software product" and "Account" ...
ThaNoob's user avatar
  • 149
-2 votes
1 answer
777 views

In report how to pull additional fields from master-detail relationship

I have an object Y with field X which is a lookup field of the same object(Y). I want to create a report that pulls many fields from my object (Y)(including field X and master-detail relational fields)...
Shamim Siddique's user avatar
0 votes
2 answers
616 views

Master Detail Relationship question

i have master-detail relationship between A&B object where A is master and B is child. Now when a record is created in object B by a user, it is visible by other user also. Is their any way to ...
jeffin boban's user avatar
0 votes
0 answers
137 views

How to create roll-up summary field on Master Object to display Status of most recent line item?

The relationship between the objects is Master-Detail. Object1 - Ticket | Object2 - Tasks. I'd like to display Status of most recent Task (line item) record on Ticket Object. How can I achieve this? ...
Marci K. 's user avatar
0 votes
1 answer
194 views

Unable to create Master-Detail relationship where AccountContactRelation is the master

Im creating a master-detail field on a custom object I just created and I was wondering why this standard object (AccountContactRelation) does not appear when I want to select it as the Master... Thx ...
Gatosaurio's user avatar
0 votes
1 answer
519 views

Set predefined values from parent object while creating child object in master detail relationship

I have master detail relationship between Opportunity and Work Order. There is Work Order related list in Opportunity. On clicking 'New' in related list, I want to prepopulate some fields using ...
Koustubh's user avatar
  • 1,133
0 votes
0 answers
595 views

External Id a standard field on Custom Objects

I am writing a data migration project to take data from an external system and map it into SFDC as a hierarchical structure of custom objects using the Bulk Api 2. The pattern is as follows: Insert ...
Mike Sowerbutts's user avatar
0 votes
1 answer
1k views

Delete permission on child object of Master Detail relationship

I need to give delete permission for one object. That object has Master-detail relationship with Account, and that profile has View all Permission for an Account object. The profile has Delete and ...
salesforce Developer's user avatar
0 votes
3 answers
1k views

How to Query all fields of grand parent record with SOQL?

I have a App__c with n number of fields. Page__c is another custom object has few fields and a field App_Id__c which is Master-Detail to App__c object. Field__c is another custom object has fields and ...
AdityaHM's user avatar
  • 133
0 votes
0 answers
2k views

Two users with the same profile but able to see different field

I have two users with the same profile but they should be able to see only their own field. In my case, I have two accounts fields. Account 1 and 2. User 1 will be able to see account field 1, same ...
Atiqah's user avatar
  • 23
0 votes
2 answers
1k views

Do we need Edit access on Parent record if they have Rollup Summary

I have a child object which has a Master detail relationship with Account. There are some rollup fields on account. Now whenever I'm trying to create a new child record using a user who does not have ...
salesforce Developer's user avatar
0 votes
1 answer
553 views

Bulk API v2.0 Master Detail Record Field Import Failed

I am going to trying and summarize this as well as I can. My standard object "Contact" has an external Id field called "Client ID". This is the unique identifier for a contact/...
Zach Godsell's user avatar
1 vote
1 answer
68 views

Error creating rows in a custom history table

We are in need of creating History Tracking for the Quote object. I am trying to make this work like the History Tracking that Salesforce already has coded in the system for Opportunities (create a ...
roxxi's user avatar
  • 13

1
2 3 4 5
9