You need to sign in to do that
Don't have an account?
sekhara
Trigger
Hi to all,
My requirement is If we check a check box in perticular profile of a account owner. Then if any of his employess r any one create a contact then Contact Name is same as account owner .
public class Cont
{
public static void cb(Contact[] c1)
{
for(Contact c2:c1)
{
user c3;
if(c3.Auto_save_account_owner__c == true)
{
c2.Owner == c3.Name;
update c2;
}
}
}
}
Error Is :
Comparison arguments must be compatible types: SOBJECT:User, String at line 10 column 1
Please revisit the code, User c3 is not initialized before doing comparison
Here code is saving and while clicking the save button i standard page error is :
" Apex trigger Cont caused an unexpected exception, contact your administrator: Cont: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Class.Cont.cb: line 8, column 1 "