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
Chidanand Magadum 24Chidanand Magadum 24 

Master-detail relationship between Product2 and a junction object

Hi friends,

Is there any way to create a master-detail relationship between Product2 and Junction Object.
Sai Ram ASai Ram A
Hi Chidanand

Unfortunately No, it's a seemingly arbitrary limitation of the platform and the Product2 object. 
Alternate Approach to achieve this is to create your lookup as a standard non-required Lookup and then enforce that the value of this lookup cannot be blank using a validation rule.
Your validation rule will look something like this:ISBLANK(ProductId__c), If the Product is deleted then this will result in the value of the field being cleared, as per the default 'Clear the value of this field.' behaviour, which will prevent you updating the child record until a valid lookup ID is entered.
If you want to change this behaviour you'll have to write a before delete trigger on Product2 with your desired logic.

P.S.  If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thank you
BLearn - Sai