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 updateCaseUserID on Case (before update) { for(Case thisCase:trigger.New){ if( Trigger.oldMap.get( thisCase.id ).Status != Trigger.newMap.get(thisCase.id ).Status){ if(Trigger.newMap.get(thisCase.id ).Status =='Working')) { thisCase.OwnerId=Userinfo.getUserID(); } } } }
Please try this code:
trigger CaseUpdate on Case (before update) {
for(Case c:trigger.New){
if( Trigger.oldMap.get( c.id ).Status != Trigger.newMap.get(c.id ).Status && Trigger.newMap.get(c.id ).Status =='Working')
c.OwnerId=Userinfo.getUserID();
}
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
All Answers
Please try this code:
trigger CaseUpdate on Case (before update) {
for(Case c:trigger.New){
if( Trigger.oldMap.get( c.id ).Status != Trigger.newMap.get(c.id ).Status && Trigger.newMap.get(c.id ).Status =='Working')
c.OwnerId=Userinfo.getUserID();
}
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
Thanks,