You need to sign in to do that
Don't have an account?
Master detail relationship
I am preparing for salesforce developer I certification and ran into a question:
A Developer wants to create a custom object to track Customer Invoices.
How should Invoices and Accounts be related to relate that all invoices are visible to everyone with access to the Account?
Of course it’s going to be a master detail relationship
There are two options:
The Invoice should have master detail relationship to the Account
The Account should have master detail relationship to the Invoice.I want to know what is the difference between the two. They both look similar.
Can someone please help
A Developer wants to create a custom object to track Customer Invoices.
How should Invoices and Accounts be related to relate that all invoices are visible to everyone with access to the Account?
Of course it’s going to be a master detail relationship
There are two options:
The Invoice should have master detail relationship to the Account
The Account should have master detail relationship to the Invoice.I want to know what is the difference between the two. They both look similar.
Can someone please help
Apologize they were not clear in the question
Here Account is standard object. Standard Objects can always be on Master side. Hence, in your case, Account will be on Master side and Invoice will be on Detail side.
-Thanks,
TK
2. The Account should have master detail relationship to the Invoice.
I want to know what is the difference between the two. They both look similar.
Can someone please help
I think the correct answer on this is the 'The invoice should have master detail relationship to the Account', sine you need to create the relationship inside the invoice object.
As for the difference, option 1 means, that the account can have zero to many invoices. and you cannot have an invoice without an account existing.
option 2 means, that a single invoice can have zero to many accounts, which doesn't make sense for rerequirement.
hope this helps.
The Master Detail relationship can exist within Standard and Custom SObjects, but the Master should be the Standard Sobject. We cannot create a Standard Object as child to a Custom Sobject. This can happen with Lookup Relationship.
- The Invoice should have master detail relationship to the Account --- The invoice(child) is related to Account(parent) stating that invoice couldnt be created without addressing the associated Account
- The Account should have master detail relationship to the Invoice --- This is not possible because it states like Account is having MD relationship to custom object.
Hope this helps you!Regards,
Deepthi
Greetings!
In the first statement, It says the invoice object is a child of account and In the second statement, the account is the child of the invoice.
But you can not create an MD relationship in standard objects,
So it means the Account should be the parent and the invoice should be the child.
So create an MD relationship field in the invoice object.
Statement 1 is correct.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi