WeDid: Salesforce Auto Renewal Oppourtunity Creation


This company sells yearly support subscription to their customers. When an Opportunity is closed, they would like to ‘clone’ another opportunity with the close date (+1 year) populated. The current Clone function is not good enough as they will need to do the following step manually:

  1. Set the close date to current Opportunity close date + 1 year
  2. Remove all the non-subscription line item



Create a trigger that automatically “Clone” an Opportunity and populate the new close date. This “Cloned” Opportunity should only consist item with certain flag only (differentiate them as renewal line item)


Related Objects Opportunity
Components Apex Trigger
Complexity Low