You need to sign in to do that
Don't have an account?
VijayNi
trigger to update contact name whenever account name is updated
Hi ALL,
can someoene help me in updating the trigger whenever name is updated in account contact should be also updatedwith same name
write a trigger whenever name is updated on account the same value should be populated on contact
trigger name on account (before update)
{
set <id> List = new set<id> [select ID,city,name from account where id in:trigger.new]
for (account a : trigger.new)
if(a.id=list.id)
{
a.name=list.name;
}
}
can someoene help me in updating the trigger whenever name is updated in account contact should be also updatedwith same name
write a trigger whenever name is updated on account the same value should be populated on contact
trigger name on account (before update)
{
set <id> List = new set<id> [select ID,city,name from account where id in:trigger.new]
for (account a : trigger.new)
if(a.id=list.id)
{
a.name=list.name;
}
}
It is a best practice to use helper class when writing triggers. Try this
ContactNameUpdate.apxt accountNameUpdate.apxc Based on https://salesforce.stackexchange.com/questions/200019/update-contacts-phones-with-account-phone-using-trigger
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you