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

parent to child record changes using trigger [duplicate]

I have trigger on parent object which is used to update field Status of child object, I want to update child object's status field to Tested only if previous values is "ready for testing". And once ...
0
votes
1answer
88 views

Need help on trigger which is used to update parent record when child record value changes

Hi i have written trigger in which SC_Problem_Management__c is parent object and SC_Problem_Case_Link__c is child object having master detail relationship. I want to update status field of parent ...
0
votes
2answers
1k views

If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name

I'm having trouble putting together a SOQL query. Basically i have a parent object (Opportunity), with multiple child objects (Borrower_Pair__c). The relationship from the child to parent is created ...
0
votes
1answer
39 views

How do i access child fields.Below is the code

trigger ProcdureTrigger on Test1105__Procedure__c (before update) { public map<Test1105__Procedure__c,List<Test1105__Procedure_product__c>> accountContactMap = new map<...
0
votes
1answer
24 views

How does joining two custom objects into one custom object through master-detail relationship work

I've been working on a test method but I've had a problem creating the setup of it. public static List<Job_Posting__c> createPostings(){ List<Job_Posting__c> testPostings = new ...
0
votes
2answers
223 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 ...
0
votes
2answers
303 views

Trying to insert to 2 different custom objects which is in a master-detail relationship

I am trying to use the DML statement to make an insert to the parent and child tables all at once. I have got it to this point so far, I am not sure how to link the child to the parent when doing the ...
0
votes
1answer
197 views

How to establish One to Many relationship using Apex

I am building an app which reads information from an external API and then populates data in my App for further processing. I have two kinds of custom objects for this. First kind (e.g., Profile) ...
1
vote
1answer
95 views

What objects cannot be masters in master detail relationships?

I have the following objects Training_Group_Criteria__c and Training_Group_Rule__c. I am trying to create a master-detail field to make Training_Group_Rule__c a detail of Training_Group_Criteria__c. ...
0
votes
2answers
25 views

Partial deletion in master detail relationship

In a master-detail relationship, if I am deleting the parent record,lets assume half of its child records were deleted after which I was getting some exception and the remaining child records were not ...
2
votes
3answers
508 views

Converting lookup relationship into master detail relationship

I had converted lookup relationship into master detail for a child object which contains lakhs of records. So when a parent record is deleted, all these child records has to be deleted automatically ...
5
votes
1answer
450 views

Is it still not possible to get the Related List Label of Lookup fields via APEX?

We wrote a custom deduplication and merge tool allowing us to overcome the Salesforce limitation only to get the deduplication UI only for a few objects. Our tool needs to work on ANY SObject (custom +...
0
votes
1answer
362 views

Count the number of details in master-detail relationship

How can I count the number of details in master-detail relationship? Let us suppose I have Detail_Type__c and Master_Type__c. Now if I have and Id of a Master_Type__c record I can do the following ...
0
votes
1answer
118 views

Opportunity and Account Relationships

We know that deleting the Account deletes the related opportunities(considering Master details relationships). However, if I delete an opportunity related to Account, will it cause the update of its ...
1
vote
1answer
189 views

Master-Detail relationship questions

I have 2 questions when it comes to master detail. We all know the detail object inherits its sharing from the master. But what about CRUD and FLS? My guess is that those are still separate but I am ...
0
votes
3answers
4k views

The number of Lookup relationship that an object can have are as in today?

The number of Lookup relationship that an object can have are as in today ?
0
votes
1answer
67 views

What is the best way to query a lookup on a Master object in Apex?

I am trying to create a Trigger on an object 'Education History' and the trigger is supposed to check if an 'Affiliation' record already exists based on comparing two fields and update that ...
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
2answers
30 views

Calculating grand total of child object's field

public static List <Pricing_Lookup__c> getGrandTotal(){ List<Pricing_Lookup__c> calculateTotal = [Select Name, (Select Name, Unit_Price__c From Activity_Lookup__r) From ...
0
votes
1answer
111 views

Need help writing query for 3 custom objects in master detail relationship

I'm trying to create a table on Visualforce page like this. Each pricelookup's description has it's own activity and purchase info. Custom parent object - Pricing_Lookup__c Custom child object - ...
1
vote
1answer
74 views

Unable to pass Master-detail id while creating multiple records using ng-repeat

I have a use case where I have to display some fields on visualforce page and then whatever data user provides on the page, grab the data and create a record out if it. Now the record needs to be ...
0
votes
1answer
1k views

Child record's record type based on Parent record's record type [closed]

Objects: Account, Opportunity Record Types: Account --> A, B Record Types: Opportunity --> a, b When creating an Opportunity I'm trying to setup an opportunity record type/page layout that will ...
3
votes
1answer
811 views

Deleting Custom Objects

I have three connected Custom Object I'm trying to delete. When I attempt to delete them, I get the following message. 'Your attempt to delete .... could not be completed because it is associated ...
8
votes
2answers
2k views

Cannot set sharingModel to ReadWrite on a CustomObject with a MasterDetail relationship field

Has anybody bumped into this error when spinning a new scratch org? Here's how this happened. I created a new scratch org and created 2 objects. One had a lookup field to the other. Then I pulled ...
0
votes
2answers
975 views

Data Loading into Master Detail relationship objects

I have a scnario which I am not able to get through. I have two objects, Obj A and Obj B, both related through Master-Detail relation with Obj A being Master. Now, I have some records to be inserted ...
0
votes
1answer
839 views

Does Salesforce Shield Field Audit trail allow field history tracking on detail objects in master details [closed]

Need to know about field audit trail, Salesforce shield.
-2
votes
1answer
24 views

Why I am not getting values in my page?

below is my class, Can you help where i am going wrong, I am not getting values in my page public class DeleteFlag { public Property__c prop{get; set;} Public Unit__c unts{get;set;} public List<...
0
votes
0answers
337 views

Can we get prior value of Parent record in process builder with child as the object?

I have a list of salesforce task copied as records in an object called AdmissionSteps. I have another object called Student. I have created a process builder with AdmissionSteps as the object. In ...
3
votes
1answer
39 views

URL Hacking - Trying to incorporate a unique count at the end of a pre-populated field

Created a URL that works fine, but I'm looking to add a count at the end of the Record name. For example: (Account Name) "Scorecard" {Count Field on Opp} + 1 Here is the URL: /a0L/e?&retURL={!...
0
votes
1answer
1k views

Process Builder creating detail records not updating master field in child records

I have a custom object called AppDoc__c which has a master-detail relationship with Case. I have a process builder on case which creates 3-records of AppDoc__c everytime a new case is created. Value ...
0
votes
1answer
211 views

Unable to create a Master-detail link on Campaign Member

I have a scenario where I have to roll up the count of active campaigns that a contact is enrolled in. To achieve this, I tried to create a master-detail on the Campaign Member to the contact. But I ...
3
votes
2answers
1k views

Summer18: Test only deployment cannot insert a new Master-Detail field

Today SF has just pushed Summer18 (api version 43) to our sandboxes. And now when our CI process is trying to validate code from branch against empty SF org, it throws bunch of same error messages ...
0
votes
2answers
1k views

Salesforce data design tool [closed]

I am looking for design tool to draw salesforce data design. I have tried Power Point and Visio but I like this design:
1
vote
1answer
942 views

Inserting Child Records with Master-Detail Relationships

I'm allowing a user to upload multiple files for accounts, contacts, and trades. Contact looks up to Accounts via a lookup field while trades look up to accounts via a master-detail relationship. I'...
0
votes
1answer
188 views

reference in visualforce the lookup field on child record in master detail

<apex:pageBlockTable value="{!oldSubscriptionAndAsset}" var="assetAndSubs"> <apex:column> <apex:facet name="header">Asset</apex:facet> <apex:...
3
votes
1answer
292 views

Cannot use Master-Detail type with Salesforce-DX

I seem to be unable to create a custom field of the master-detail type. Because each time I create one and try to push it to another scratch org I get this error message :  Cannot set sharingModel to ...
0
votes
1answer
950 views

Sharing rule on Detail object

Lets take we have 2 objects 'Invoice' and 'InvoiceLineItems'. Both are in Master Detail relationship. At OWD Level i kept the Private for Invoice. We have a requirement as follows. I want to ...
0
votes
2answers
450 views

How to check if a child object is null in Javascript Button?

I'm creating a javascript button on the Quote object that would redirect to a link in another window. I only want to redirect to this other window, if there's a child under the record. For this ...
0
votes
1answer
163 views

Child records fields editable if parent is read only for profile

I have one object - A ( Custom Object) is the master to object B ( Child Object). A is set to read only for P (profile). A is from managed package which was installed by one vendor. Is there any ...
6
votes
1answer
1k views

“Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail” on an “sfdx force:source:push”

Been getting the error: Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail this morning when editing/adding fields to some custom objects that are in a master-...
2
votes
2answers
6k views

Master-detail relationship between standard objects [closed]

Is there any master detail relationship between standard objects? If not, then why there is no master detail relationship between them? I am unable to find such relation between them.
4
votes
1answer
1k views

How to refer to an existing record in REST API composite JSON?

When using REST API composite JSON, how to refer with external id an existing record to existing Master-Detail parent from a newly created child We have the following objects: Organization__c: Has ...
0
votes
1answer
972 views

Accessing parent fields from an id on the child

I written a trigger that inserts a custom junction object on opportunity and contact when an opportunity product record is created. I have created a before insert trigger and helper class for the ...
0
votes
1answer
110 views

Get a list of Master records from a list of child records [duplicate]

I'm making a trigger that runs when contacts are updated. Part of that trigger is to get a list of accounts (the whole object, not just the ID) associated with the contacts that are being updated. ...
1
vote
1answer
362 views

Count of Child Objects & Update it Grand Parent Field

We have 3 objects Obj A,Obj B & Obj C. Obj C has Master Detail Relationship with Obj B & Obj B has Master Detail Relationship with obj A. Obj A is the Grand Parent Object of Obj C. What I ...
2
votes
0answers
253 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)....
-1
votes
1answer
86 views

System.StringException: Invalid id: Demo

I'm trying to insert records into a custom object called Webinar_Attendee__c. In that I have a master-detail field called Webinar__c. When I insert records I get an error like: System....
1
vote
1answer
350 views

Flow not creating a new record?

I'm relatively new to Salesforce development. Right now, I'm making a voting app that contains two objects; a contestant object and a vote object. Each object has the following fields: Contestant: ...
0
votes
0answers
263 views

Does master record (having rollup summary field) always get updated when a child record is updated?

Does master record (having rollup summary field) always get updated when a child record is updated regardless of the change in value of rollup summary field? In short, will the last modified date ...
5
votes
1answer
1k views

Update custom Lightning Component on Master when Detail “Related List” Component edited

I have a custom Lightning Component on an Opportunity Record FlexiPage, that shows a Master-Detail relationship Rollup Calculation (e.g. the count of detail records). After adding an item via the "...

1
2
3 4 5
7