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

How do we change a lookup relationship to Masterdetail

I have a lookup relationship and i am looking at ways to convert this relationship to Master Detail. I have made sure that there are valid ids on the lookup and none of them are null. And when i try ...
1
vote
1answer
1k views

Toggling “Allow Reparenting” on Master Detail record

I have a master detail relationship that does not currently allow re-parenting. I also have some detail records that were created on the wrong parent. Will I be causing any problems in my instance ...
0
votes
1answer
76 views

Not getting back related lists from a query

Is there any way to get Salesforce to return related lists when I lookup an object using their API? Right now I am searching Contact objects for an email address and I am able to get back all the ...
5
votes
1answer
303 views

When using FOR UPDATE does Salesforce also lock the child records in a master-detail relationship?

For example, say I get a List of rows to delete using FOR UPDATE. These are all parent records in a master-detail relationship. Will the children be locked?
1
vote
2answers
380 views

Required fields are missing in master detail relationship

I Have a trigger on IT_Asset__c object. And trigger runs on update. The problem is in the error: Required fields are missing: [Account]: [Account] I stuck on this error, because i don't understand ...
4
votes
1answer
2k views

Why can't Leads or Users be Masters in a Master-Detail relationship

I ask this both out of curiosity, and if I wanted to create an object that I wanted to act as a child to one of those objects I would have a better idea how I could do that. Let's say for example ...
2
votes
1answer
48 views

Possible to Add a Lookup Relationship to Network Object?

I am looking to add a custom field that is of type "Lookup" or "Master-Detail" to the Network object. This appears to be missing from the list of objects that can be selected. Is it possible to do ...
0
votes
1answer
209 views

can't create many to many relationship between Account and Product

Product is not showing up in the object list when I am trying to create a master-detail relationship from my junction object. what's the workaround? Thanks
1
vote
1answer
327 views

Custom Button that passes Case ID into Custom Object

I am using Cases and I have several custom objects that I have built and they are linked using Master-Detail relationship and they are on the Case page layout using Related Lists. If I leave as is ...
1
vote
1answer
76 views

Unique records in related many to many sObjects [closed]

For example i have sObject named User, and it contain field name. How check field name for unique, in input moment? AND How do that in related many to many Objects? For example i have three ...
11
votes
1answer
507 views

Obtaining Single Record - SOQL vs. Instantiating New Object

Background I have a custom object which has a master/detail relationship to Opportunities. Whenever a record on this custom object is created or edited, I need to update the parent opportunity (and ...
1
vote
0answers
134 views

How to enable lookup filter

I'm trying to find a way to add filter to a lookup popup window but I'm unable to find how to do that. I have custom object which has master/detail relationship and what I want that when the user ...
2
votes
0answers
62 views

Updating Foreign Keys in a Master Detail Relationship on a Junction Object

I've created a custom object called CampaignQuote that has a master-detail relationship with Campaigns and Quotes/Orders. In this use case Quotes/Orders are used in the same way opportunities would be ...
1
vote
1answer
396 views

How to get 'Roll up summary field' in “Master Detail Relationship” on 'Detail page' using Formula?

Is it possible to get the 'Roll Up Summary field value' in the Master Detail Relationship on Detail page as well. Basically to get a copy of 'Roll Up Summary value' in Detail page as well for a ...
1
vote
1answer
424 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
108 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
111 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-up ...
0
votes
1answer
1k 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
76 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
401 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 ...
2
votes
3answers
993 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 ...
0
votes
1answer
80 views

Change Master Detail Relationship default behavior

There is a 'Communities' object in Salesforce that has a master-detail object called 'Baseline Surveys' below it (For every community, there can be several baseline surveys). However, a city lead ...
1
vote
1answer
1k 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
2k 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
34 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
265 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
41 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
170 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
1k 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
686 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
871 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
253 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
488 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 ...
6
votes
1answer
393 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
149 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
59 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
91 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
28 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
486 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
110 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
921 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
59 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 ...
6
votes
2answers
1k 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
459 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
43 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
2k 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
473 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" ...
4
votes
2answers
1k 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 ...
1
vote
1answer
1k 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 ...
3
votes
1answer
477 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 ...

1 2 3 4 5 7