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
0answers
20 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 ...
1
vote
1answer
15 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 ...
4
votes
1answer
100 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 ...
0
votes
1answer
27 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
1answer
38 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 ...
0
votes
1answer
31 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?
0
votes
0answers
22 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
1answer
48 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
0
votes
2answers
22 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
0answers
17 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
32 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 ...
0
votes
0answers
31 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
60 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
1answer
59 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 ...
0
votes
2answers
21 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
0answers
17 views

Master-Detail Field Disabled Inside SalesforceLWC

I have a custom edit form which uses lightning-record-edit-form. Since this is an edit form, fields are expected to have values upon load. In my case, all fields have values, but I noticed that the ...
0
votes
1answer
19 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
1answer
81 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 ...
0
votes
1answer
43 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
1answer
40 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
2answers
165 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
1answer
227 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 ...
0
votes
1answer
28 views

Deny or allow the creation of a new record if in the parent object (records) - the field of the picklist type has the status “closed” or “active”

I have two objects: Training and Participant with a master-detail relationship (Training (master), Participant (detail)). When training is "canceled" (Status (Picklist) field selected ...
0
votes
0answers
51 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
109 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 ...
1
vote
1answer
77 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. ...
0
votes
0answers
42 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
59 views

Add products on custom objects vs. junction object - please help!

My organization awards scholarships. I have two objects: scholarship and recipient. I need to be able to track the awards that each recipient receives, without creating a new record each time the same ...
0
votes
1answer
16 views

How to display master variables in visualforce

I have a master-detail relationship with master object Service__c and child object Service_Task__c. The relationship API is Service_Task__r. I am using a custom controller. My visualforce page is ...
0
votes
1answer
154 views

How to insert new records into the custom object using Data Loader which has “Master-Detail” relationship with Account?

I have an Account object and a custom object "B" where Account is Master and "B" is Child. I already have Account data and I am looking for inserting records in "B" using ...
0
votes
1answer
119 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 ...
1
vote
1answer
142 views

Error when attempting to change a relationship from a lookup to a master/detail in sandbox

Cannot add a master/detail relationship because the division and/or owner fields are in use: DatasetData: null What sort of metadata is "DatasetData"? It sounds related to WaveDataset, but I believe ...
0
votes
1answer
159 views

LWC Display a field based on the selected parent record

On a new form, I have a master-detail relationship field <lightning-input-field field-name='contactrel__c' onchange={handleContactChange}></lightning-input-field> {DoNotCall} I would ...
2
votes
0answers
228 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....
0
votes
2answers
31 views

how to update parent field from child

I got 2 objects Service_Request__c(Parent) and Service_Line__c(Child). I'm trying to do is update a field of parent object from child.based on the following condition. In the following code, I'm not ...
0
votes
1answer
326 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
1answer
180 views

Mass upsert Master Detail records at the same time

I have two custom objects with Master Detail relationship. I need to be able to bulk upsert these records simultaneously. For example: If the master records don't exist, create them. Otherwise, ...
0
votes
0answers
94 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
1answer
171 views

Field Not Writable - Master field on Child object

I have the below functionality inside a for loop, the highlighted field is a master field in the child object that is populated in this piece. For the first iteration it populated the value but the ...
0
votes
1answer
180 views

Insert related record to account when field is matched with child record

I have a custom object named Merged_Account__c which has lookup to Account object. This child object has name field and it has similar values as that of Account name field. Now, when the name fields ...
2
votes
2answers
104 views

If I convert master-detail relationship to lookup relationship will there be any data loss?

We are planning to convert an existing Master-Detail relationship to lookup relations. I wanted to know if there will be loss of existing association when the field type is changed from M-D to lookup. ...
0
votes
1answer
165 views

After Deleting Parent Object in Master-Detail relation, what happens to the triggers we have created in child object

In a master detail relationship in child object if we created trigger on child object after delete.when parent is deleted will the trigger execute?
0
votes
1answer
51 views

formula field on master record that displays a text field on the max child record

I have a custom object, Recoveries Placement, related to the Case object in a master-detail relationship. I need to surface a text field from the MAX Recoveries Placement record on the Case layout. ...
1
vote
0answers
102 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. ...
0
votes
0answers
153 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' ...
6
votes
1answer
566 views

Does Lookup Skew affect only master-detail relationships or also lookup ones?

I've been encountering and reading a lot about data skew issues, particularly lookup skew, and I've noticed that most information I've found doesn't explicitly indicate whether this affects master-...
0
votes
0answers
61 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
1answer
392 views

How to loop over child objects of master object in batch object

I have a batch process to update Accounts with address info from the Cust_Address__c object. I use a Junc_Account_Address__c object as a junction. How do I loop through the accounts to update the ...
1
vote
2answers
23 views

Question regarding soql many to many relation update

I have a many to many relation. Account obj, AccountAdress junction, Adres obj. The junction object has a startdate an enddate to make an address active for an Account. I want to use a batch process ...
0
votes
2answers
64 views

Mobile SDK SmartSync SFParentChildrenSyncUpTarget INVALID_FIELD_FOR_INSERT_UPDATE fields = OpportunityId

Using Salesforce Mobile SDK 7.2 for iOS with Swift 5. Attempting to syncUp an Opportunity Line Item that has been updated on the device results in the error: errorCode = "...

1
2 3 4 5
8