When I am deactivating a user I get a warning to say that they are included in email alerts and so cannot be deactivated. However, as I have hundreds of email alerts set-up, it is not practical to go through each one manually to find the offending alert/s. Additionally it is not possible to display the recipient of the alert in the email alerts list view. Therefore i need to be able to query or report on the email alert object to find this information. How can I report on email alerts and show the recipient value for the alert.
You can use Tooling API for this and query the WorkFlowAlert table from developer console:
- Open Developer Console >
- Click on Query Editor
- Check "Use Tooling API"
- Set query, e.g. SELECT Id, DeveloperName, Description, CcEmails, SenderType, TemplateId FROM WorkFlowAlert WHERE CcEmails like '%email@example.com%'
- Click Execute