function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
eswar aeswar a 

reparenting

any one tell me about reparenting with example
sandeep@Salesforcesandeep@Salesforce
Hi,

Reparenting means when we change reference of parent record from child record. in look-up it is allowed to change parent reference. 

But y default, records can’t be reparented in master-detail relationships. Administrators can, however, allow child records in master-detail relationships on custom objects to be reparented to different parent records by selecting the Allow reparenting option in the master-detail relationship definition.

Thanks 
Sandeep Singhal
Rajesh  Adiga PRajesh Adiga P
Hi,

Reparenting mean, If on your org Account and Address are having look up relationship then while creating an Address [For Ex: ADDR_001 ] record you need to select the Account [say for ex: Account_ID: ACC10] record then save this record, so now the Account_ID: ACC10 is the parent of the Address ADDR_001, but you can edit the Address record and change the Account field on the Address to say Account_ID: ACC11 so now the same Address [ ADDR_001] is reparented to the account  Account_ID: ACC11 from Account_ID: ACC10


Thanks
Adiga
Vishnu SanthoshVishnu Santhosh

Hi,

In a Master-Detail Relationship, records cannot be reparented. However, to allow child records in master-detail relationships on custom objects to be reparented, enable the “Allow reparenting” option in the master-detail relationship definition. 

When the 'Allow Reparenting' option is enabled, users can change the parent of the child records. When the parent is changed for a child record, the child record access will move to the new parent record since sharing for the child record is inherited from the parent record in a master-detail relationship.

[SOURCE (https://www.infallibletechie.com/2022/02/allow-reparenting-in-salesforce-master.html)]

Thanks,
Vishnu