function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger ActiveChange on Account (before update) { List<Account> newaccounttocraete= New List<Account>(); for(Account acc:Trigger.new){ Account oldacc= Trigger.oldmap.get(acc.id); if(!acc.Active__c && oldacc.Active__c ){ Account accnew= new Account(); accnew.Name= acc.name; newaccounttocraete.add(accnew); } } insert newaccounttocraete; }
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
If the Account is changed twice from True to False means two Accounts need to be created?
Can you check the below trigger.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,