I am a bit of a Noob so this may be a Noob questions, but I am trying my first trigger to copy an address from the account shipping address into the account billing address fields when a custom checkbox, Billing_as_shipping__C is checked. Here is what I have and getting a compile error variable not found.
trigger AccountCopyBillingtoShipping on Account (before insert) {
if (account.billing_as_Shipping__C = True){
for (account accId : Trigger.new) {
accId.ShippingState = accId.BillingState;
accId.ShippingStreet = accId.BillingStreet;
accId.ShippingCity = accId.BillingCity;
accId.ShippingPostalCode = accId.BillingPostalCode;
accId.ShippingCountry = accId.BillingCountry;
Update accID;
}
}
}