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
0 votes
1 answer
44 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 ...
  • 31
0 votes
2 answers
59 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. ...
0 votes
1 answer
29 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 ...
0 votes
1 answer
29 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 ...
0 votes
1 answer
46 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 ...
1 vote
1 answer
37 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 ...
0 votes
1 answer
98 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..
0 votes
1 answer
153 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 ?
0 votes
2 answers
637 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?
  • 33
2 votes
1 answer
294 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....
  • 69
2 votes
0 answers
88 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 ...
0 votes
0 answers
16 views

Salesforce relationship [duplicate]

When A child object having two master detail relationship with two different parent objects. Here which parent record owner will restrict the child records ?
0 votes
1 answer
458 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?
0 votes
1 answer
35 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 & ...
0 votes
1 answer
350 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 ...
0 votes
1 answer
29 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){ ...
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 ...
  • 3,245
0 votes
1 answer
64 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 ...
0 votes
1 answer
56 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 ...
1 vote
1 answer
142 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" ...
  • 149
-2 votes
1 answer
211 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)...
0 votes
2 answers
233 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 ...
0 votes
0 answers
52 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? ...
0 votes
1 answer
73 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 ...
0 votes
1 answer
156 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 ...
  • 1,064
0 votes
0 answers
375 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 ...
0 votes
1 answer
441 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 ...
0 votes
3 answers
602 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 ...
  • 133
0 votes
0 answers
607 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 ...
  • 23
0 votes
2 answers
550 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 ...
0 votes
1 answer
265 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/...
1 vote
1 answer
41 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 ...
  • 13
4 votes
1 answer
532 views

Do Master Records (in a Master-detail Relationship) Get Locked?

Suppose the following: There's a master-detail relationship between two custom objects There are no roll-up summary fields on the master object There are no declarative automations or Apex triggers ...
  • 674
0 votes
1 answer
1k views

Access child object fields on custom classic email templates

In my use case, I have 2 objects called 'Object A' and 'Object B'. 'Object B' contains a master-detail relationship to Object A. I have an email alert which has been set up on 'Object A'. In the ...
0 votes
1 answer
565 views

Rollup summary field between multiple objects

I have 4 objects: Contact, Attendee, Events, and Event Category. I want to create a rollup field on the Contact object to count total number of Events (where event category = Training) attended by ...
  • 97
0 votes
1 answer
39 views

Why do we need two master-details relationships while creating many-to-many

I'm preparing to SF Dev1 exam and noted that they suggest using MD instead of Lookup. What can be the reasons using this approach?
  • 697
0 votes
0 answers
85 views

How to skip a mandatory field in custom layout when you create a new record

Background; I have created a custom object A which has a Master-Detail relationship field to a Parent object (Let's say it's field F). I also created a custom layout for the object A. Problem When I ...
-1 votes
1 answer
98 views

Check constraint in master-detail [closed]

Is it possible to implement 1:1 relation between master and detail. I'm not able to create neither rollup summary on master nor trigger on detail
  • 697
0 votes
2 answers
61 views

Java Devlopment: How to Map Detail Objects to Their Master Object in Master-Detail Relationships

I have a Salesforce project in which I will be automatically popualating custom SObjects from a Java app. This will be done by pulling data down from a database, parsing it (including a JSON payload), ...
0 votes
0 answers
36 views

Why Opportunity object has special features than others [duplicate]

I need a little explanation on Opportunity object. I was wondering Account and opportunity objects are in Lookup Relation but acting as Master-Detail. Also in workflows, we can update Account Records ...
's user avatar
0 votes
0 answers
92 views

What is the recommended way to filter a child object from the parent object through SOQL

I have a child object that I need to create which would be related to Opportunity. Let's call it RepPay. I wanted to know what is the best way to create this relationship for querying purposes which I ...
  • 1
0 votes
1 answer
228 views

Internal Salesforce.com Error in while inserting records of Master - Detail Object

I have a scenario where I need to insert more than 60 detail records of a single master. In the same instance I have to insert the master record get the ID and then insert 60 different details of the ...
0 votes
1 answer
743 views

To display an error message when a record is submitted for approval using apex trigger

Please help me with this code, Writing a Trigger to display an error message on Opportunity_Support_Request__c record which has no OSR Product and if it is submitted for Approval(by clicking on Submit ...
  • 9
0 votes
2 answers
851 views

Update Parent Object Field using Apex Trigger on Insert Child Object

Question: How can I update a parent field with some information I parse from the child? Invoice__c is the Master/parent and LineItem__c is the Detail/child object. My code so far: (See WHAT I WANT TO ...
0 votes
1 answer
36 views

Assign child to parent with objects in the same method

I need to assign the child of a parent record that is in the same method. Would I have to insert it before assigning the Id to a parent? //Add row method for both lists public ...
2 votes
1 answer
583 views

Master-detail relationship SOQL query works in dev console but not Apex

I have a junction object that links a meeting note to contacts who attended the meeting. It is a master-detail relationship. How do I get the name of the linked contact too in Apex? It works in ...
  • 322
0 votes
1 answer
130 views

Authentication required error when inserting records with master-detail relationship on force.com site

I've got a force.com public site that is accessible without user login via guest user. For some strange reason, this site works 100% when it is inserting a record alone, but throws an error when ...
1 vote
1 answer
93 views

How to update related record with parent field in VF custom controller

What I have in my custom controller is an assignment when a user inputs a value for a certain field, the field for its parent object will update as well. For example. User inputs the school for a ...
0 votes
2 answers
941 views

Need help with Validation Rule in Master Detail relationship

I am new to Salesforce and need help in writing a validation rule. I have a Master object that can have multiple child objects.The child object has a field 'Type' with value lets say X and Y. If one ...
  • 1
0 votes
1 answer
808 views

Master - Detail relationship New record from related list

I have an object which has a master detail relationship with Account object. I want when creating a new record for this new object from the Account related list, to suggest the current account and not ...

1
2 3 4 5
8