• 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

  • 146,642 hits

Archives

Recent Posts: Salesforce Everywhere

Expert Salesforce Solutions from a Turnaround Master :)

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?

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Follow this Blog via Email

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

Powered by WordPress.com.

Loading Comments...