So I have object validation that is only working when a user clicks a pencil and edits this but when they use the app or click the edit field flags every time regardless of whether anything was changed. I managed to stop the problem by removing 'BillingAddress' from the formula so I have narrowed it down to this but have no clue why. It almost seems that when editing the full page it automatically assumes billing address has been changed regardless of anything happening to it. It was stopping my users from editing anything at all.
For explanation purposes, only admins and one user can change these fields as the changes need to echoed on our ERP system for accounts that purchasing.
AND(Sales_Ledger__c,
$Profile.Name <> "System Administrator",
$Profile.Name <> "GF Smith Marketing User",
OR(
ISCHANGED(Name),
ISCHANGED(Account_Code__c),
ISCHANGED(RecordTypeId),
ISCHANGED(Requires_Branch__c),
ISCHANGED(BillingAddress)
))
Please help!
Thanks,
Shay
4 respuestas
Eric Praud (Activ8 Solar Energies) Forum Ambassador
Hi Shay,
Does it happen to everyone or only a few users? If the latter, I'd clear cookies and cache.
If all, can you try to split the Billing address like so:
ISCHANGED(BillingStreet),
ISCHANGED(BillingCountry),
etc...
The field API names are here:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_account.htm