Wait, what?
Most Salesforce enthusiasts working around Sales Cloud would know, but in case you were not aware, yes! until Spring ’21 release there was no way of creating a relationship with Opportunity Product/OpportunityLineItem.
You can now simply create a new Lookup or Master-Detail relationship from a standard or custom object.

And simply select the Opportunity Product object.

But where can I use this?
One such use case can be that I want to have some history tracking(using custom object), capturing the lifecycle of my OpportunityLineItems.
My life is now made easy where I can now get this done by simply creating a new relationship to this object. Wondering how I would do without it? That’d be a long story for another blog! 🙂
Hello, I believe this information is not entirely correct.
I have been trying to create a Master-Detail relationship from a custom object to an Opportunity Product (OpportunityLineItem), but it does not seem to be possible. The option does not appear, when selecting a Master-Detail custom field.
It can be achievable with a Lookup relationship, though.