Please enable JavaScript
getRelationshipOrder() method from the DescribeFieldResult class can be used to check the relationship type(Master-Detail or Lookup) using Salesforce Apex. Blog Post: https://www.infallibletechie.com/2024/01/how-to-check-the-relationship-typemaster-detail-or-lookup-using-salesforce-apex.html