I have created Opportunity Name workflow rule as follows

Account.Name & " | " & PRIORVALUE(Name) & " | " & TEXT(Today())

Output is

Account Name | Priorvalue = whatever is entered user | today date in year.month.date

Here is the screenshot of the opportunity

Current opportinity name

But when my process builder creates renewal opportunities for the future date. the current opportunity name becomes prior value and created opportunity looks like this

Future opportunity name

Is there a way of resolving this? or writing a better workflow rule which can take care of this? Functionally i am open for suggestions as well.

Best Regards Prashant

  • sorry it is not validation rule but a workflow rule which i have written, sorry for the mistake i made in the question Jul 4, 2018 at 18:02
  • You can edit your own question to make any changes you like. Please don't use comments to append additional information to a question.
    – sfdcfox
    Jul 4, 2018 at 18:26

1 Answer 1


Yes, you could do that. I imagine it would look something like this:

Account.Name & " | " &
IF(CONTAINS(Name, " | "),
MID(Name, FIND(Name, " | "), FIND(Name, " | ", FIND(Name, " | ") + 1) - FIND(Name, " | ")),
Name) &
" | " & TEXT(Today())

The lack of variables make this particularly verbose; if possible, I would consider using a trigger instead. This would also reduce the CPU time used in this particular situation.

  • I tried your validation rule, when my renewal opportunity is created, prior value is missing in the new opportunity i.e., an original entry which i have manually entered is not replicating in the new opportunity name Jul 10, 2018 at 13:53

You must log in to answer this question.

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