You need to sign in to do that
Don't have an account?

restrict activity related list
I have a picklist on account object called "Status"and one of the values is "Duplicate"
I want to prevent the users from creating any tasks/events against an account when the status is duplicate.
Any ideas how to achieve it.
I cannot create a validation rule on the Activity object as it does not allow to reference custom account fields.
Then, modify this trigger for the Event object, too.
All Answers
Then, modify this trigger for the Event object, too.
Thanks a ton.
Can you please provide the test class for code coverage as well.
Possibly a few more fields, depending on your system's validation, but that should just about do it.