ISCHANGED can only be used when the WFR is triggered "Every time the record is created or edited"
ISCHANGED
Description: | Compares the value of a field to the previous value and returns TRUE if the values are different. If the values are the same, this function returns FALSE. |
Use: | ISCHANGED(field)and replace field with the name of the field you want to compare. |
Validation Rule Example: | The following validation rule prevents users from changing an opportunity name after it has been created:NOT(ISCHANGED(Name)).
NOT(AND(ISCHANGED(Priority), ISPICKVAL(Priority, “Low”)))is a validation rule that ensures if a user changes the Priority of a case, the new priority cannot be “Low.”
NOT(AND(ISCHANGED(CloseDate), OR(MONTH(CloseDate) <> MONTH(TODAY()), YEAR(CloseDate) <> YEAR(TODAY())),$Profile.Name <> "Sales Manager"))is a validation rule that prevents a user from changing the Close Date of an opportunity to a date outside of the current month and year unless that user has the “Sales Manager” profile.Note
$Profile merge fields are only available in Enterprise, Unlimited, and Developer Editions.
|
Tips: |
|
No comments:
Post a Comment