function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
babrannobabranno 

ISCHANGED

I am pretty new to salesforce and I am struggling to create a validation rule.  I want to use the ISCHANGED function with a phone or fax number.  So if the phone or fax number is changed on an account then it triggers a field update on a custom object.  The workflow keeps telling me that I cannot use ISCHANGED with a phone or fax number.  Does anyone have a work around?  Thanks for the help.

 

Bladen

Steve :-/Steve :-/

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:
  • This function is available only in:
    • Assignment rules
    • Validation rules
    • Field updates
    • Workflow rules if the trigger type is set to Every time a record is created or edited.
  • Use the NOT function to reverse the return values of TRUE and FALSE.
  • This function returns FALSE when evaluating any field on a newly created record.
  • If a text field was previously blank, this function returns TRUE when it contains any value.
  • For number, percent, or currency fields, this function returns TRUE when:
    • The field was blank and now contains any value
    • The field was zero and now is blank
    • The field was zero and now contains any other value
babrannobabranno

I was aware of that caveat; however, the ischanged does not want to work with the standard phone number data type from account.  That is why I am having trouble getting the workflow to work. 

shruthishruthi

If you are sure, that you are using "Every time the record is created or edited", ISCHANGED(Phone) does work on Account. I think you are missing something else where. Remember Phone is treated as a text and if you are trying to update a field which is a number try using VALUE(Phone) in your field update.

Also, check if you have activated your worflow rule.

It would be great if you specify what trouble you are having and when.