You need to sign in to do that
Don't have an account?
sourabh kalva
Write trigger that handles the following. Whenever a case is created with origin as ‘Phone’, set status as ‘New’ and Priority as ‘High’ and assign it to the user ‘XXXXX’. Retrieve the details of user using the user name ‘XXXXX’.
Write trigger that handles the following. Whenever a case is created with origin as ‘Phone’, set status as ‘New’ and Priority as ‘High’ and assign it to the user ‘XXXXX’. Retrieve the details of user using the user name ‘XXXXX’.
trigger caseex on Case (before insert,after insert) {
user u=[select id,name from user where alias='xxxx'];
for(Case c:trigger.new){
if(trigger.isBefore){
if(c.Origin=='phone'){
c.Status='New';
c.Priority='High';
c.OwnerId=u.id;
}
}
}
}