Parker Edelmann – Opportunity Contact Role (01/06/2017)

There is a custom picklist field on Contact called Business Role. This field’s values correspond to the Business Role field on Opportunity Contact Roles, the junction object between Opportunities and Contacts. Your boss wants two things to be done:

  1. When a Contact is created, and the Business Role field is filled out, create an Opportunity Contact Role (OCR) for all open Opportunities that belong to the Contact’s Account.
  2. When an existing Contact’s Business Role changes, update the value of all OCRs belonging to open Opportunities in the Contact’s Account, and create new OCRs for Opportunities that don’t have one for that Contact. Closed Opportunities should not be updated.

Slides: Presentation Deck