function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MarkLevyMarkLevy 

Disable All Email Notifications on Task Assignment

I have no idea why but out of nowhere when I coded some additional APEX to assign tasks when leads get created my users started getting email notifications on task assignment. I was already assigning tasks this way, I just added some more that get created so I have no idea why this started happening now.

I don't want my users to be emailed when they are assigned tasks. I've found a workaround but it's really sloppy. The only way I can seem to get this to happen is to go to Activity Settings and 'Enable User Control over Task Assignment Notifications' and then go into every user's account and under Activity Reminders uncheck Email me when someone assigns me a task.

Is there some way I can change a global setting that disables email notifications on task assignment for all users? Or maybe create a trigger in APEX on user creation that sets this field to false? I can't seem to find where the field is if the trigger method is possible.

Any insight as to how to disable all email notifications on task assignemnt globally or find out where in apex I can work with the 'Email me when someone assigns me a task' field would be helpful.

Thanks!
GauravGargGauravGarg
Hi Mark,

There is a workaround, please go through the below link:
https://help.salesforce.com/articleView?id=000003633&type=1

Hope this helps.

Thanks,
Gaurav
SKype: gaurav62990
MarkLevyMarkLevy
Hi GauravGarg,

I've tried that workaround (creating a new task, selecting the checkbox to create an email notification, unselecting the checkbox to create an email notification, and selecting the checkbox to make it default) and that didn't seem to do anything unfortunately.
GauravGargGauravGarg
Hi Mark,

After un-check the checkbox also, email are throwing out of salesforce. 

Is there any custom code written to send email. Can you please check the debug logs for this. 

Please see if there is any, also you can directly contact me on skype: gaurav62990

Thanks,
Gaurav