• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: Master Detail relationship error

Tip#8 : Troubleshooting “cannot create a new Master-Detail relationship” error

21 Monday Sep 2015

Posted by Mani in Salesforce Configuration

≈ Leave a comment

Tags

Master Detail relationship error

To demonstrate the case, let’s say that we have a custom object called “RateCard” and it has got a lookup field “Account”. We want to convert the lookup relationship to Master – detail, as we can have more than 1 Rate Card per account(1:M relationship). I tried changing the lookup to Master Detail for the account field and got the error “cannot create a new Master-Detail relationship”.

This is due to the reason that the lookup field(Account) in all RateCard records did not have a value. Once I populated the value for Account field in the records that didn’t have it, I could convert the Account relationship to Master – Detail. Please note that Master – Detail relationship requires Detail Record (Child) ALWAYS have a Master (Parent) record since the detail record inherits security and ownership from the parent record.

Let me know your comments.

Blog Stats

  • 144,918 hits

Archives

Recent Posts: Salesforce Everywhere

Einstein GPT

How to get field values on onLoad in lightning-record-edit-form in LWC?

Using Dynamic Actions

How to check if the logged in user is a Guest user or not in APEX class?

How to Close Quick action in LWC

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Website Powered by WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Salesforce Everywhere
    • Already have a WordPress.com account? Log in now.
    • Salesforce Everywhere
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar