This type of relationship closely links objects together such that the master record controls certain behaviors of the detail and subdetail record.

learn more… | top users | synonyms

0
votes
1answer
41 views

Update siblings and parent record in the same after update trigger

I have written a code to update all the sibling's and parent contact's field when one of the child records have been updated. The logic here is to make checkbox false on all the siblings and parent ...
1
vote
1answer
24 views

Two related list 'new' buttons behave differently

I have a page for a parent object with two related lists on it. Both related lists are master-detail relationships with the parent object. On both related lists, the standard 'new' button is enabled ...
1
vote
0answers
16 views

What's a work-around for creating a master-detail relationship for Users?

I'm trying to create a user-centric schema and running into the limitations of the built-in user object. I need the following: Managers should see a list of all users assigned to them with a roll-...
0
votes
1answer
40 views

Can I get roll-up summary field without a master-detail relationship

We are trying to move to the Standard Order Object from a Custom object we used to track Orders (Orders1) - Since Orders1 was a custom object I was able to create a Master-Detail relationship with ...
0
votes
1answer
22 views

How to access contact name and custom field from detail record?

Assuming that Training__c is the child of contact in a master/detail relationship how to fix my WHERE so that it works? Right now I get an error "Didn't understand relationship 'contact__r' in field ...
3
votes
3answers
126 views

Trigger to prevent edit on parent if there are no related child records

I've a scenario where there are 2 objects(Trail-master and Vehicles-detail) and no edits is to be allowed on parent if there are no related child records. I've tried the below code but without any ...
1
vote
3answers
139 views

Can We assign a null value to an Master Detail relationship?

Can We assign a null value to an Master Detail relationship? It is required by default and hence while inserting to database it comes as Required Value missing? And if I try to insert some dummy value ...
1
vote
1answer
43 views

Inserting a child record with Parents external id not working

In one of our requirement we have to clone a parent and then also clone the child and attach the cloned child with the new cloned parent. The child and parent have a M-D relationship. There is two way ...
0
votes
1answer
28 views

Custom object not available in “related to” list of a master-detail field of a custom object

I am attempting to create a master-detail field on a custom object, and on step 2 in the "related to" dropdown I am looking for another custom object that I created before but unfortunately it is no ...
0
votes
1answer
28 views

Need help with a trigger test

I am extremely new to salesforce and am having trouble working on a project for work. I need to test my trigger for adding a discounted quote to an opportunity based off of the original quote amount. ...
1
vote
1answer
34 views

Detail Object not available in Test Class

I have an Object- Foo( Master ) and an Object- Hoo(Detail). Hoo is a child of Foo and related by a Master Detail Relationship. I am creating a test class where I need to access Hoo object from Foo. In ...
0
votes
1answer
27 views

Default Value for a field in one Record Type

I have a lookup field on my Custom Object which has 2 record types. This field is a Master-Detail one While creating a new record for this Custom Object, I want this lookup field to be auto-populated ...
0
votes
1answer
21 views

Validation rule that prevents saving a lookup if that lookup value (Product) doesn't already exist on Opportunity

I have an object - myCustomObject__c that is has a Master-Detail relationship to Opportunity. On this object I also have a lookup to Product. I want to throw a validation error if a user tries to ...
2
votes
1answer
59 views

How to solve the issue in trigger? (Does formula field update fire trigger?)

I have 4 objects Order (parent to carset)-- >car set (parent to service) --- >Service Simple product (lookup to service)--- > service In "order" I have a check box "Sample_Creation_Network_Mail__c" ...
1
vote
1answer
80 views

How do i Upsert record in Parent- child relationship from custom to custom object Using External ID

We have data integration Job for SQL SERVER - SFDC using Talend data integration tool. SFDC environment: Full sandbox Account We have two custom object. In that, Master-Detail relationship from ...
3
votes
1answer
107 views

Do calculations on child records properties for master record

I am developing data model like master - Order, childs - Order items. There is master-detail relationship. Order items have quantity and price per each item. How do I create read-only field on master ...
0
votes
2answers
42 views

Master-detail relationship query all children

The Master object Custom_Opportunity__c have a master-detail relationship on Product__c. Normally there are many Product__c records under one Custom_Opportunity__c record. Every time I use ...
2
votes
3answers
48 views

Classify parent based on number of child records in a master detail relationship

I need to count the number of child records that a parent has in a master-detail relationship and based on the count, update a field on the parent. This field cannot be a formula field as it needs to ...
3
votes
2answers
68 views

Unable to create Master Detail Relatioship

I have some custom object - TestObj1, TestObj2, TestObj3.... TestObj1 - Only have 2 Master-Detail fields(With TestObj3 and TestObj4 Objects) TestObj2 - I have Master-Detail with TestObj5 now Why ...
5
votes
1answer
60 views

What happens to Master-Detail after deleting (Managed Package)

When I delete a Master-Detail relationship in my managed Package Will it be replaced by a Lookup, like this Knowledge arcticle says? Will there still be a Master-Detail relationship in our customers ...
0
votes
0answers
60 views

How do I create a many-to-many relationship to the same object?

I have a need to create a hierarchy of products, where one product is the 'base' product and other products are used to make up a final item. For example the 'base' product is a chair, but the ...
1
vote
0answers
25 views

Child relation is 'not a column" in Javascript Remoting

I'm running in to an issue where an object fetched from Salesforce through JS remoting is not able to be sent back because it has a relation field. This is the setup: A function retrieves a wrapper ...
3
votes
1answer
40 views

Preventing access to detail records using CRUD

I have a custom object B that has a master detail relationship to Account. The sharing settings on Account are set to Private. Account CRUD for sys admin and user 1 is create, edit, view, delete. The ...
3
votes
1answer
20 views

Is it possible to give users view access to a master object without giving it to details of the master object?

I'm dealing with a request to make Accounts visible to all users. However, we have a custom object which is in a master-detail relationship with accounts. This custom object should not be visible to ...
0
votes
1answer
55 views

Trigger error System.QueryException: Variable does not exist

I have two custom Objects Member and Issue. Issue has a master detail relationship with member. The field called MASTER of Issue is a master-detail field that points to Member object. I'm creating a ...
0
votes
0answers
31 views

How to upsert child object with master details realationship to another customobject,which one master as opportunity

I have one custom object(named: Class__c),it has master another custom object (Plan__c). Further this Plan has Standard object Opportunity as master. I have Class.csv files which contains classes ...
2
votes
1answer
87 views

Insufficient Privilege error while creating a record

I have a Permission set to assign CRUD permission to a certain custom Object say CI__c. This is a Junction object of two other custom object C__c and I__c. While creating a new record in that junction ...
2
votes
1answer
26 views

Querying related objects

I have a relationship between objects as below: User->Contacts->Account->Parent I am trying to get the parent id using the following SOQL query: [Select user.contacts.account.parentid from ...
5
votes
2answers
186 views

profile object permissions for a detail record

When readng through trailhead salesforce I came across a line which I am unable to digest. The line says - "You can’t set profile object permissions for a detail record". What does this mean? In my ...
2
votes
1answer
44 views

Do roll up summary calculations count against the CPU limit?

Hopefully a straightforward question - if I insert/update/delete records into an object that is a detail of another object, does the server performing the roll up summaries count against the platform ...
0
votes
1answer
30 views

N>Help with Passing Values from one Object picklist to another Object text

I have 3 objects Contact, mList and mEvent. mList is a junction object which has master-detail relationships to both Contact and mEvent. The mEvent has a picklist field called Group_Level__c (values 1,...
1
vote
2answers
134 views

Unable to create Master-Detail relationship field

I am configuring a many-to-many relationship between custom object and Contact. For this purpose I created a junction object. Next, I have to create 2 Master-Detail relations. One for custom object, ...
3
votes
0answers
62 views

Re-parenting Master-Detail relationship in managed package

I have installed a managed package in my org and unfortunately one of its master detail field(of one object created by managed package) is not allowed for re-parenting. i.e., "Allow reparenting" ...
5
votes
2answers
56 views

Is it possible to query the lookup object fields of child object?How to do it?

We have a parent object say ParentA with its associated child object as ChildA with a custom field customerName of type lookup(Account). Now I would like to retrieve AccountNumber, which is field on ...
0
votes
1answer
45 views

Lookup Filter with related fields that are more than one relationship away from the lookup object

I want to add a lookup filter for the lookup between Package Version and Release. So I just can choose Releases which are linked to the same Program as my related Package. This is not possible ...
4
votes
1answer
45 views

Look up to Master-detail through MetaData API: “cannot add master-detail relationship due to existing data rows”

Trying to change the existing relation between A(Parent) and B(Child) from Look up to Master- Detail. Deploying "B__c.A__c" using ANT. Ran a query on B and made sure all B__c.A__c is populated (As ...
0
votes
1answer
146 views

Call Child Object Fields Using Visualforce for Master-Detail Relationship

I am attempting to create a visualforce table section on the Account object. The Card Spend object is a child via master-detail to the Account object. I keep getting "Error: Invalid field ...
0
votes
0answers
15 views

Is field master detail [duplicate]

is there any way I can find out if a field is a Master Detail? Right now I have implemented a code that throws a false positive in a required lookup field. Map<String,Schema.SObjectField> ...
0
votes
2answers
189 views

Delete trigger error message on deleting a Master object record

I got two objects Business_Unit__c and Project_Portfolio__c having Master detail relationship and the junction object is, Business_Unit_Project_Portfolio_Lookup__c. I want to display an error message ...
0
votes
1answer
29 views

Detect if related list exceeds a specific number

I have two related objects example Teacher and Student. Inside my parent object Teacher I have a field maximum_number_of_student.What I want is that if I add a new student the code will check if I ...
3
votes
2answers
66 views

Unable to query child record through inner query

I have custom objects called 'Project' and 'Status Report'. Project is a parent and Status report is child in a master detail relation ship. With in trigger i wrote below query and getting the below ...
0
votes
0answers
23 views

Create & Retrieve Nested Records with iOS SDK

How can I create and retrieve nested records with the iOS SDK? Is this even possible? I have 2 objects with master-detail relationship and I'd like to be able to create and retrieve them in one ...
2
votes
1answer
63 views

Any reason not to use Lookups instead of Master-Details for Junction object?

To build n-m relationships one needs a Linker/Junction object with two references. The Salesforce documentation recommends two Master-Detail relationships. Is there any reason why not to use two ...
0
votes
1answer
52 views

Can a master-detail relationship be added to an object deployed in managed package?

I have been trying to find out how adding a new master-detail field to a released object (Object released in SF Managed Package), would impact the upgrade process. As far as adding master-detail ...
0
votes
1answer
21 views

Is there a way to update a <apex:detail> in a visualforce page with a custom save extension?

We have a VF page that were using, and we are displaying the related lists with the standard tags. Is there anyway we can use a save button feature that can go through and get the related records and ...
5
votes
1answer
297 views

How to implement Lookups in Lightning Components?

Assume you have a Lookup or Master-Detail relationship defined in the metadata and now you need a simple UI. In Visualforce lookup-controls on the UI run out-of-the-box using <apex:inputField ... /...
0
votes
0answers
36 views

*URGENT* Master detail field is not populated by using the same trigger which is working fine with Lookup

trigger FetchID on CustomObject1__c (before insert, before update) { List<string> CompanyID = new List<string> (); for(CustomObject1__c agc: Trigger.new) { CompanyID....
1
vote
0answers
41 views

Hide Related list on parent Page layout for users not in Opportunity Team

I need to hide related list on opp page layout for users who are not an opp Team member. The related list is a custom child object XYZ[Detail] of opportunity[Master]. How to implement it ? Please ...
0
votes
2answers
131 views

How to prevent trigger firing on the detail object when master object is inserted/updated

Hi I have 2 custom objects and have a master-detail relationship between them. Master : Certification Slot Detail : Certification Slot Detail I write a trigger on Master object for a ...
3
votes
1answer
1k views

Inner SOQL child to parent query

I have written the below parent to child inner query which works : List<master__c> masterObj = new List<master__c>([Select id, (Select ID FROM detail__r) FROM Master__c]); Which ...