+ Start a Discussion

Master-Detail Lookup Field Locked for Editing after Creation

I've created a master-detail relationship field on a custom child object, looking to a custom parent object. When I create the child record, of course the master-parent record is required, and I'm then able to save the child record.


But once the child record has been saved, the master-detail lookup field to the parent record is now locked - I'm unable to edit the master-parent record, even though I had edit read-only field rights.


Any ideas would be great, thanks!

Nevermind - It's a Salesforce limitation

Hi Justin,


The master-detail feature is modelled to behave like that only(on edit of detail record, master look-up is locked and cant be edited irrespective of read/read write rights).


But yes, you can change the master field value when you 1st create detail record(before save).






Force.com Certified Salesforce.com Developer


Hi Vimal,

Is there any way to change it after you've saved the record? Thanks!


I'd really like to know if anyone (recently) has found a solution for this issue. 


For our development process, I have created a master-detail relationship between "Sprint" (master) and "Story" (child).  


Here's the scenerio we are running into from time to time.... 


  1. Create a new sprint record 
  2. From the Sprint record, create the stories that belong to that Sprint.

Occassionally, a story is entered under Sprint A but needs to move to Sprint B.   Currenly the sprint field is locked.  Is there a way to allow edits to this field?  



The workaround that we are currently using is to clone the story and assign it to the correct sprint and then delete the old.  These extra steps are not ideal for how we operate.  


Any help on this would be appreciated.    






I am not sure hold old is this question, but there is a proerty in the Master-Detail field definition that is called "Allow Reparenting" (it is a checkbox).

If checked, the Master lookup field will not be locked anymore.



Jancy MaryJancy Mary
Awesome, thanks @sebastiangnagnarella. These are the small points to be remembered which we always tend to forget. Your answer helped me.