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
Amit Karlekar 4Amit Karlekar 4 

Update The New Owner Name on ContactRelationship Name

I have been trying for the following requirements but have not succeeded. Please give it a try and let me know if it works for you. I will appreciate 👍

Write a trigger and handler class for the following scenario:

Create a field called the "Contact Relationship" checkbox on the contact object and create the object called "Contact Relationship" which is a related list to the Contacts (Lookup Relationship). Create a record.

When we change the owner of the Contact Relationship(Custom Object), the new(updated) owner name will be automatically populated in the Contact Relationship Name Field.

AshwiniAshwini (Salesforce Developers) 
Hi Amit,
Have you encountered any errors while trying the scenario?