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 CaseTrigger on Case (before insert,before update) { Set<ID> caseIds=new Set<ID>(); for(Case cas1:Trigger.New){ if(cas1.ContactId!=null){ caseIds.add(cas1.Id); } } if(caseIds.size()>0){ for(Case cas1:Trigger.New){ if(cas1.ContactId!=null){ Contact cont =[select Id,Name,Phone, Email from Contact where Id = :cas1.ContactId]; cas1.SuppliedPhone=cont.Phone; cas1.SuppliedEmail=cont.Email; cas1.SuppliedName=cont.Name; //update case information with corresponding contact info. } } } }
You can try following code:
Let me know it works!
All Answers
You can try following code:
Let me know it works!
Thank u Vanisha