Ask Search:
Eric LopezEric Lopez 

Error: The ISCHANGED function cannot reference the Account.Name field. Why?

What's the rationale for not letting me use ISCHANGED on the Account field on an opportunity?
Best Answer chosen by Moderator (salesforce.com) 
Matthew LambMatthew Lamb
Try just using Account, you don't need to use Account.Name if your goal is to see whether or not the Account fields on Opportunities has changed (assuming this VR is running on Opportunities).

All Answers

William CobbettWilliam Cobbett
I can't speak for SFDC on the rationale but a way around this is to use an Apex trigger to compare the trigger.old value with the trigger.new value.
Matthew LambMatthew Lamb
Where are you trying to use this? If in a workflow rule, you must set the evaluation criteria to "Every time a record is created or updated" in order for ISCHANGED to work.
Eric LopezEric Lopez
My bad, I was not specific. I am trying to write a validation rule to prevent people from changing the account associated with an opportunity. Part of my criteria is to include this line:

ISCHANGED ( Account.Name )

When I attempt this, I get this: 

Error: The ISCHANGED function cannot reference the Account.Name field.
Matthew LambMatthew Lamb
Try just using Account, you don't need to use Account.Name if your goal is to see whether or not the Account fields on Opportunities has changed (assuming this VR is running on Opportunities).

This was selected as the best answer
Eric LopezEric Lopez
Perfect. Thanks!