+ Start a Discussion

Restrict activity creation?

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.




You have to write trigger on Task and Event both object on before insert and put trigger.addError whenever Account.status = "Duplicate".


Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Hitesh Patel
SFDC Certified Developer & Administrator