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
NMNM 

Opportunity Partner Trigger

Hello,
I'm trying to write a trigger that takes the Opportunity Primary Partner name and populates it in a custome opportunity field.
 
I thought of writing an Opportunity before update trigger, but I realised this is not the right event. I changed the trigger to a Partner after insert trigger, but I got the message:
 
ErrorError: Compile Error: Incorrect SObject type: Partner should be Opportunity at line 1 column 1

I also tried to changed it to an OpportunityPartner trigger, but got the message:

ErrorError: Compile Error: SObject type does not allow triggers: OpportunityPartner at line 1 column 34
 
Does anyone have a way to implement this requirement?
Thank you :)
NM