I want all of my Account billing addresses to be in uppercase.
I have created a trigger like this:
trigger CleanAccount on Account (before insert, before update){
for(Account a : trigger.New){
//simplified for post...
if(a.BillingStreet != null) a.BillingStreet = a.BillingStreet.toUpperCase();
}
}
When I change an Account's Billing Atreet from 123 OLD ST to 456 new ave within the ui, it properly saves it as 456 NEW AVE.
However in the Account History it creates 2 records
- Changed Billing Street from 456 new ave to 456 NEW AVE.
- Changed Billing Street from 123 OLD ST to 456 new ave.
Is there a way to stop a duplicate record from being added to the account history?
I don't even understand why it creates 2 records because it should not be saving the record until the trigger has executed.
(My org exclusively uses Person Accounts and there are no other triggers on the Account object)