You need to sign in to do that
Don't have an account?

Trigger to update account information section in new record with old record values
I have a record in account with billing city pune. Now I want to create a record with billing city pune but account information section values should be updated with previous record values whose billing city is pune. how I can achieve it
As per your requirement ,You have one record with billing city pune.
You are creating new record is it also an account?
If so then when you crete one more record there will be duplicate records. So their must be some unique criteria
other than billingcity pune to decide from which old record to update account information section values .
If you are sure only one record will return then plese update below sample code as per your logic
Thank You
Thank you for the solution but actual requirement is I've two record types in contact one is new contact and another is renewal contact. I've created a contact whose record type is new contact and again I've created a record with record type renewal contact. the common field linking these two records is account. If the account is same for two records then I want to get same values of certain section in record with recordtype in record which of record type renewal same as values of record type with new contact. please write the trigger helper and handler I need the solution quickly it is urgent.