[SalesForce] How to create Lead Owner change Workflow formula

I'd like to create a formula that when a Lead's Ownership is either a specific person(s) or a Queue, and it changes, the workflow rule fires.

I have tried the below formula with no success. It says I cannot use the PRIORVALUE function with the Owner:Queue.Id field. Thank you in advance for any assistance.

AND(OR(PRIORVALUE(OwnerId) = "005j000000CL8wz", PRIORVALUE(Owner:Queue.Id) = "00Gj0000001YmxF"),ISCHANGED(OwnerId))

Best Answer

Check when the rule is evaluated. You cannot use PRIORVALUE when you are have your evaluation set to "created, and any time it’s edited to subsequently meet criteria"

Check this out for more info.

https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_functions_i_z.htm&language=en_US#PRIORVALUE