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 caseCheck on Account (After update) { List<Account> allAccounts = new List<Account>([Select id,Fuzion_Status__c,(select id from cases where status in('New','Open')) from account where id in :Trigger.new]); List<Case> newCases = new List<Case>(); for(Account myAccount :allAccounts){ Account oldAccount = trigger.oldMap.get(myAccount.id); if(oldAccount.Fuzion_Status__c == 'Initial Phone call' && myAccount.Fuzion_Status__c != 'Initial Phone call'){ if(myAccount.cases !=null){ Case c = new Case(); c.Accountid = myAccount.Id; c.Type = 'ICM'; c.Origin = 'SHIP'; c.Division__c = 'Case Management'; c.Status = 'New'; c.RecordTypeId = '01236000000OJLq'; newCases.add(c); } } } if(!NewCases.isEmpty()){ insert newCases; } }
Check below sample example.
Please mark as Best Answer if above information was helpful.
Thanks,
All Answers
Check below sample example.
Please mark as Best Answer if above information was helpful.
Thanks,
Thanks,