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.

82 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
164 views

How to denormalise a Master-Detail relationship

Contacts have Specialities (skills) to sell so I have a Master-Detail from Contact to Speciality. We sell Product (1/2 day, full day) for those Contacts so the Product has a lookup to the Contact. ...
3
votes
0answers
519 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" ...
3
votes
0answers
147 views

“invalid domain” creating a Master-Detail field on a junction object

I was attempting to set up a Junction Object in an organization with Person Accounts enabled to link Business Accounts with Person Accounts. I set up the Account Master-Detail on the custom junction ...
2
votes
0answers
26 views

Running into error Invalid field:Contact__c in related list:Foo__c.Account__c when deploying Account layout

Custom object Foo__c has master-detail relationship with object Account through field Account__c. Custom object Foo__c also has master-detail relationship with object Contact through field Contact__c....
2
votes
1answer
159 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 ...
2
votes
0answers
162 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" ?
2
votes
0answers
254 views

Can't see new record in Related List without refresh: actionOverride

Context: I'm building a lightning component to override the New action for a custom sObject, let's call it My_Object. My_Object has a master detail relationship with Contact (My_Object is the detail)....
2
votes
0answers
42 views

Users can edit anything when I use a VF page as an Edit override

I want to allow my users to only edit records they own with two objects which are in a Master/Detail setup. I have the following setup : Master Object : OWD : Public Read Only User's Permission Set ...
2
votes
0answers
63 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 ...
2
votes
1answer
177 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" ...
2
votes
1answer
186 views

Restrict access to sibling records (in community)

I have a sharing/permission issue I cannot work out simply. My structure is a top-level object called "Project", which has a Master-Detail (because we need roll-ups) to a child called "Assignment" ...
2
votes
0answers
288 views

Create Master and detail records in single insert without external ID

I can't seem to find a direct answer for this... I am hoping to create a master record and one or more detail records in a single API call. Most resources have suggested the use of an external ID, but ...
2
votes
0answers
188 views

Parent Lkp Id empty when custom New page is used in Salesforce1. Why?

I have a master detail Child__c object with a custom page override for New and Edit. This page is used in desktop and mobile Salesforce1 context. My problem: the page doesn't work in Salesforce1 as ...
2
votes
0answers
180 views

Filtering Contact's child custom object data based on its relationship with Contact's Account

My apologies if this question is answered here earlier...but the ones that I read (case/account/contact filtering etc.) seem different then this. I have the following relationships... Account >-< ...
1
vote
1answer
25 views

Soft-Delete in Salesforce for All data[For Auditing]

We have a requirement to maintain every data(even deleted also) for approx 10-15 yrs with its Audit history. We have Salesforce-shield is enabled so maintaining Audit data is taken care of by it. ...
1
vote
0answers
15 views

Joined Reports with 2 unrelated child objects

I'm trying to create a joined report with a custom object (object A) as the base. It is the Master in two Master-Detail relationships (Object B and Object C). Object B and Object C are NOT related. ...
1
vote
0answers
303 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 ...
1
vote
0answers
100 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
0answers
533 views

Why does data loader fail a whole batch of records if just a single master-detail relationship is not filled correctly?

I'm trying to upload records using the data loader. The object I'm loading into has a master-detail relationship, but in the CSV, I don't set any external id or Salesforce id that identifies the ...
1
vote
0answers
350 views

Error in change set with MasterDetail relationship even after relationship deleted

I'm getting the following error: Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field I've looked it up online and found out that it (likely) ...
1
vote
0answers
87 views

Apex trigger Not populating values on lookup field

I have trigger which updates the few master record fields based on the values of the child record. IT_Asset_Management__c is the master object and Employee__c is the detail object. The following is ...
1
vote
1answer
417 views

Updating an existing Object fails with error INVALID_FIELD_FOR_INSERT_UPDATE

This is the exact error : from smartSync SFLogger ERROR com.salesforce : Sync type:syncUp id:6 FAILED cause:Server call for sync up failed error:Error Domain=CSFNetworkErrorDomain Code=400 "Unable ...
1
vote
0answers
815 views

ENTITY_IS_DELETED error when loading Detail records with External Id

I have a Master-Detail relationship between 2 objects. The child object has a unique External Id field that I'm using to handle duplicates during database commits. The scenario that falls apart is as ...
1
vote
2answers
443 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 ...
1
vote
1answer
334 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
0answers
140 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 ...
1
vote
1answer
116 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
137 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 ...
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 ...
1
vote
0answers
62 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 ...
1
vote
0answers
91 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 ...
1
vote
1answer
203 views

Field not writable after Database.rollback() and clone()

This is my custom save method: private void saveNewMode() { Savepoint toBeforeState = Database.setSavepoint(); try { insert parent; for(ChildA__c prs : childrenA) { ...
1
vote
0answers
24 views

Lead with Companies

I want to create a tab called Company that will be connected with the Leads. More specifically if a company has multiple leads I want to categorize them. Lets say that the company has Company Name ...
1
vote
0answers
89 views

Visual force Page throwing error on New record

I have a related list on a master record, when I clicked NEW on the child record it is suppose to bring the visual force page(which by the way works fine for edit), but instead it gave the error ...
1
vote
0answers
504 views

Apex Sharing for granting record access to other users

There is a scenario in which an opportunity is created by a Sales User.Hence in this case the Opportunity Owner is the Sales User. This opportunity needs to be teamed up with other sales user so that ...
1
vote
0answers
386 views

Add new record, then add master-detail record on save

I have a master-detail record that works like this: Contact > ContactEmail > Email (based on this many-to-many document: https://help.salesforce.com/apex/HTViewHelpDoc?id=relationships_manytomany.htm&...
1
vote
0answers
57 views

Report on child records and field in parent only once per child

Say you have a structure like Account 1, Annual revenue = 100,000 Contact 1 Contact 2 Account 2, Annual revenue = 200,000 Contact 3 Does anybody know if a report can be developed to show ...
0
votes
0answers
13 views

Cannot Create Lookup Relationship on Custom Object

I'm trying to create a lookup relationship field however it's giving me an error saying it cannot create a Master-Detail relationship, which is not what I selected. Is there any reasion for this ...
0
votes
0answers
23 views

stripinaccessible stripping fields for system administrator

I have a generic function to validate CRUD before DML which uses stripInaccessible(). public static SObjectAccessDecision validateCRUD(AccessType access, List<SObject> records, Boolean ...
0
votes
0answers
30 views

How to populate count/sum of certain fields (Number datatype) in a custom object?

Custom object "A" should have certain fields like "Number of Contacts with training date" and "Number of Contacts Last Trained". Currently "A" has look-up ...
0
votes
1answer
21 views

Roll-Up Summary field filter limited in number of added criteria

I have two objects object A ( Master ) and object B ( Detail).I am trying to create a rollup summary field on master A object of Select Roll-Up Type Count. However, when I try to add a criteria to the ...
0
votes
1answer
72 views

Upserting records via Simple_Salesforce API on a field with Master-Detail relationship

I'm trying to use Python's simple_salesforce library to upsert on an object called Member Plan that has a required field called MemberId which is a Master-Detail relationship with the Account object. ...
0
votes
0answers
26 views

Master-Detail Relationship - Process Builder

I have a Custom Object = A, another Custom Object = B in a master detail relationship and the Account Object. I want to be able to make checkbox = true on the Account, depending on some criteria on ...
0
votes
0answers
13 views

Use flow loop to add the parent to a list

I have a master-detail relationship between Account and Property Agreement: I'm using a "Get records" element to browse through the child records and I need to add the parents to a list. I tried ...
0
votes
0answers
152 views

Update checkbox on the father object depending on the child values - with a trigger

I need to update the 'Is Cloud Customer' check box in the account object when at least one of the Child's as the Installation type field containing the word 'Cloud'. If none of the Child as 'Cloud' ...
0
votes
0answers
27 views

Joined reports with master-detail relationship

I'm having problems trying to make a report of some custom objects, they're arranged like this: A (detail) <-- B (master) --> C (detail of B)(master of D) --> D (detail) Any ideas of how to get ...
0
votes
0answers
53 views

Auto Populate Master-Detail relationship when creating record in salesforce community

I am implementing a salesforce community. In that I have included a standard list view. So it enables New button and I can create a record using that. When creating an record the user have to fill a ...
0
votes
0answers
80 views

Error on inserting Child record of Master Detail Relationship

Error on inserting Child record on custom object which is having Master Detail relationship with other Custom Object. I have two custom Objects x and Y which are in Master Details Relations. There ...
0
votes
0answers
68 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 ...
0
votes
2answers
231 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 ...