function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
for(Account acc : Trigger.new){
acc.ShippingState = acc.BillingState;
acc.ShippingStreet = acc.BillingStreet;
acc.ShippingCountry = acc.BillingCountry;
acc.ShippingCity = acc.BillingCity;
}
}
All Answers
for(Account acc : Trigger.new){
acc.ShippingState = acc.BillingState;
acc.ShippingStreet = acc.BillingStreet;
acc.ShippingCountry = acc.BillingCountry;
acc.ShippingCity = acc.BillingCity;
}
}
you can do the operation using,before events why your going to after it's not abest practice.
try this
trigger shippingAddressUpdate on Account(before insert, before update){
for(Account acc : Trigger.new){
acc.ShippingState = acc.BillingState;
acc.ShippingStreet = acc.BillingStreet;
acc.ShippingCountry = acc.BillingCountry;
acc.ShippingCity = acc.BillingCity;
}
}