Skip to main content
We are implementing a third party scheduling app that the office staff use to create new work job appointments for specific Salesforce Users, which then gets fed back into Salesforce as a calendar Event, assigned to the appropriate User.

 

The Opportunity exists prior to the appointment scheduling.  Once the job has been assigned in the third party app and the calendar Event created in Salesforce, the ownership of the Salesforce Opp should be updated to match the User the Event has been assigned to.  The third party app is connected to the Opportunity through the Event's "Related To" field.

 

I've seen lots of suggestions on how to do the reverse type of flow:  updating a task to match the parent object's ownership, but I'm going in the opposite direction:  Looking at the child (the Event Assigned To field) to update the related parent (the Opportunity Owner field)

 

I don't think this can be done with either a workflow or with process builder.  So I think I need to resort to Apex.  I don't consider myself an Apex specialist.  Is there a simple trigger that could accomplish this task?

 

Thanks!
1 risposta
0/9000