Using a Process Builder i've created a rule that when the "Renewal Date" (custom field containing a formula), located in the Opportunity object, is reached, that Opportunity is cloned.

It might be possible though that our sales managers would decide to Renew the Opportunity prior the Renewal Date, in which case they would have to create new Opportunity record manually. In that case there would be no need to clone the original Opportunity when the "Renewal Date" is reached.

What i was thinking about is to add a custom field called "Opportunity Cloned" and set the Process Builder to skip records if "Opportunity Cloned equals Yes".

Is there a way to create an automatic rule that whenever a new Opportunity record is created, all previous Opportunity records (might be more than one) related to the particular account will have this "Opportunity Cloned" field changed to "Yes", therefore taking them out of the automated cloning process?

Due to specific of our business, sometimes we have to create 50+ Opportunities, which is done via Salesforce Excel Uploader. So the solution of creating a custom "Clone" button (with javascript to update previous records) might not work.

Thanks in advance!


Using the Flow i was able to create a process that whenever the Flow is run it looks for Opportunities with "Opportunity Cloned" = No and changes it to "Yes". Using the Process Builder this Flow is launched whenever a new opportunity is created. The problem is that it changes that field for ALL opportunities, not only for those related to a certain account (for which the opportunity is created, for example). Is there a way to allow the changes only for the opportunities related to a particular account?

Flow Structure

Fast Lookup Settings

1 Answer 1


I was provided with a solution on that matter at Salesforce Q&A. Many thanks to Mayank Srivastava for that and for kindly allowing me to repost it here (just in case anyone else came across the same issue):

Mayank Srivastava

This is what you can do:

  1. Create another variable in your Flow: varAccountID
  2. Withing the process which fires on Opportunity creation, as a part of the Launch Flow action, pass the Opportunity's Account ID into the Flow variable so:

    varAccountID equals Reference [Opportunity].AccountId

  3. Now for the Fast Lookup element in your flow, add the following to the Lookup filter criteria:

    Opportunity_Cloned__c Equals No

    AccountId Equals varAccountID

This way only those Opportunities will be updated that are related to the same Account.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .