• 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.

Advertisement

Blog Stats

  • 114,771 hits

Archives

Recent Posts: Salesforce Everywhere

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

Lightning component to filter Products and display results in lightning data table

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Developer links

  • Salesforce Developer website
  • Salesforce Success Community

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.

  • Follow Following
    • Salesforce Everywhere
    • Already have a WordPress.com account? Log in now.
    • Salesforce Everywhere
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar