+ Start a Discussion
SapamrmSapamrm 

Function PRIORVALUE may not be used in this type of formula

I'm trying to create a worfklow rule using the criteria below

 

 

 

 

I want to send an email to the account owner as soon as the status of the "orders blocked"-picklist field is set to "Yes" and the previous value was equal to "No" or "Yes/No".

 

I thought this was an easy one but apparantly this kind of formula is not possible in Salesforce?

Can anybody explain me why not, and how to formulate this criteria rule so that it doesn't give an error message?

 

 

Thanks in advance.

SapamrmSapamrm

I just googled (yea I should have done this first before posting here) and came across someone with the same problem.

 

Apparantly this kind of formula only works if the rule evaluation criteria is set to "Every time a record is created or edited".

Mahesh FoxMahesh Fox

Yeah  it's correct. I tried it

JoliJoli

Really late answer, but might be useful for folks who come across this later.

 

Looks like your syntax is slightly incorrect. The syntax is PRIORVALUE(field__c) << note the close parentheses after the field ID.

 

This should work:

ISPICKVAL(PRIORVALUE(Orders_blocked__C, 'No')

 

 

 

Mike MelnickMike Melnick
Not to be too much of a geek, but...

you actually need one more close paren.
ISPICKVAL(PRIORVALUE(Orders_blocked__C, 'No'))
 
Kavita Badgujar 10Kavita Badgujar 10
Yes. it works when evaluation criteria is set to "Every time a record is created or edited".

The reason is that the function is checking what the existing value was prior to editing. If it didn't exist it can't be compared. Formula fields technically do not store anything in the database level as they are calculations.

Hope this helps.