You need to sign in to do that
Don't have an account?
Roopa S 1
plz help me to write test class for this
trigger deleteUserTrigger1 on Task (before delete) {
Id profileid=Userinfo.getProfileId();
profile profilname=[select Name from Profile where id=:profileid];
for(Task accountDuplicate:Trigger.old){
if(profilname.Name!='System Administrator'){
accountDuplicate.addError('No Access for Deletion');
}
}
}*/
Id profileid=Userinfo.getProfileId();
profile profilname=[select Name from Profile where id=:profileid];
for(Task accountDuplicate:Trigger.old){
if(profilname.Name!='System Administrator'){
accountDuplicate.addError('No Access for Deletion');
}
}
}*/
Please try with below code getting 100%
If this helps, please mark it as best answer.
Regards,
Ankaiah
All Answers
Try Below Test Class Please Mark It As Best Answer If It Helps
Thank YOU!
Please try with below code getting 100%
If this helps, please mark it as best answer.
Regards,
Ankaiah
Please use below code with 100% code coverage
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
Hope you are doing good,
I have written a Test class for your requirement, please follow the below code for your reference.
I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.
Thanks and regards
Suraj Tripathi