+ Start a Discussion
Himanshu Verma 9Himanshu Verma 9 

How to get this scenario with trigger

We need the unit test to verify that a user that should not modify a Worker Status record is unable to Delete it, and then to verify that a user who IS supposed to modify a Worker Status record IS able to Delete it. How to get with trigger ?
veda shriveda shri
Hi Himanshu,

you can handle this with profile setting right? why you need to go for trigger?

Give delete permission to the user who can update the worker status record.

Please let me know if I missed something while understanding your problem.

Himanshu Verma 9Himanshu Verma 9
Hi Veda,
i have written trigger and class but i can't get this task for user delete permission. My task requirement have to complete with trigger and i stuck in test class? 
veda shriveda shri
That means you need help for test class right? can you please share the code here. I can check some method for test class?