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.

88 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
556 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....
3
votes
0answers
708 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
152 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
1answer
628 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
310 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
298 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
43 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
84 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
204 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
252 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
298 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
192 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
181 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
143 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
210 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
448 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
161 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
726 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
395 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
94 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
514 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
1k 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
1answer
367 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
146 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
131 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
189 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
63 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
92 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
209 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
531 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
391 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
61 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
28 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
0answers
86 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
0answers
24 views

Compinent product-category relationship

I have some problem with my category-product relationship. I am using junction object to connect product and category with master-detail, but it gives me an error in my component that i dont get. ...
0
votes
0answers
157 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 ...
0
votes
1answer
88 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/...
0
votes
0answers
44 views

Master-Detail relationship reparenting

I have a master-detail relationship that reparenting is allowed. But when I try to change the master record from the child, I get 'Your Profile does not allow to perform this operation. For additional ...
0
votes
0answers
25 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 ...
0
votes
0answers
124 views

Errors when using Import Wizard to upsert custom object records with external ID

I am trying to upsert a large number of records into a custom object "Invoices". This Invoices object is a child of Accounts. Thus, every Invoice record I upsert must be associated with a ...
0
votes
0answers
41 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 ...
0
votes
1answer
26 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 ...
0
votes
2answers
497 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 ...
0
votes
0answers
163 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
183 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
67 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
291 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 ...