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
Abhijeet Purohit01Abhijeet Purohit01 

Help needed to Convert a look up field to master-detail field type.

To convert a Look Up field to Master Detail field:

 

1. I have created a dummy record in the master object and have populated this record into all the records of Detail object.

2. Changed the field type from LookUp to Master-Detail successfully.

 

Now can I delete that dummy record from the Master object? If yes then will it not affect/delete the existing USEFULL RECORDS from the Detail Object?

 

 

Abhijeet

MagulanDuraipandianMagulanDuraipandian

If you delete the Master object records, surely its child object records will be deleted. In Master - Detail relation, we have cascade delete.

Abhijeet Purohit01Abhijeet Purohit01

To convert a Look Up field to Master Detail field:

 

Master Object : Delivery Challan

Detail Object: Delivery Challan Items

 

1. I created a Look Up field in Delivery Challan Items with Look Up to Delivery Challan.

2. Created a dummy record in the Delivery Challan Object and have populated this record into all the records of Delivery Challan Items object.

2. Changed the field type from LookUp to Master-Detail successfully.

 

Now can I delete that dummy record from the Master object? If yes then will it not affect/delete the existing USEFULL RECORDS from the Detail Object?

 

 

Thanks for the reply. So how should I remove that dummy record now?

MagulanDuraipandianMagulanDuraipandian

If you delete the Delivery Challan dummy records, its associated Delivery Challan Item records will also be deleted. So, kindly change the Delivery Challan data for all Delivery Challan Item records and then delete the Delivery Challan Dummy records.

 

If this is the solution, kindly mark this as the solution.

Abhijeet Purohit01Abhijeet Purohit01

Thanks for the reply. Can you please elaborate.  You said "So, kindly change the Delivery Challan data for all Delivery Challan Item records"

 

What does it mean : change the Delivery Challan Data for all the Delivery Challan Item records?

 

What to change ?

 

I have created one dummy record in the master object Delivery Challan. This field is read only and always on the layout.

What to change and how to change in this master object?

 

MagulanDuraipandianMagulanDuraipandian

Consider 'A' as the dummy record created by you in Delivery Challan and it has useful detail Deliver Challan item records associated toit. If 'A' is deleted, its associated Delivery Challan Item records will also be deleted. So, change the Master for all Delivery Challan Items and then delete the dummy records.

 

 

http://infallibletechie.blogspot.in

Abhijeet Purohit01Abhijeet Purohit01

Ok. Thanks.