You need to sign in to do that
Don't have an account?
Soujanya Uppal 9
change owner through custom label?
hi everyone,
how to change owner on new record on account through the custom label in trigger????
I have done through this-
trigger changeownerTrigger on Account (before insert) {
user u= [select id, name from user where Alias='ragh'];
for(Account ac: trigger.new){
if(ac.Industry=='Agriculture'){
ac.ownerid=u.id;
}
}
}
how to change owner on new record on account through the custom label in trigger????
I have done through this-
trigger changeownerTrigger on Account (before insert) {
user u= [select id, name from user where Alias='ragh'];
for(Account ac: trigger.new){
if(ac.Industry=='Agriculture'){
ac.ownerid=u.id;
}
}
}
Please try the below code:
Thanks.
Maharajan.C