You need to sign in to do that
Don't have an account?
Balaram Admin
using apex triggers how to create a new contact record with values of account when the contact Mailing Address is null
Hi Guys,
Requirement: insert Contact Mailing address with Account Address when a create new contact and Mailing address is null...
Requirement: insert Contact Mailing address with Account Address when a create new contact and Mailing address is null...
http://amitsalesforce.blogspot.in/2015/06/trigger-best-practices-sample-trigger.html
Please let us k now if this will help u
All Answers
http://amitsalesforce.blogspot.in/2015/06/trigger-best-practices-sample-trigger.html
Please let us k now if this will help u
//Create a trigger on contact object with before insert and before update event.
trigger ContactTrigger on Contact(before insert, before update){
//Create list of account id and query on Account obejct with details you need and then add then you can use below code
for(Conatct c : trigger.new){
for(Account aa: queriedAccountList){
if(c.AccountId == aa.Id){
c.MailingCity = aa.MailingCity;
}
}
}
}