salesforce - 是否可以为从工作流程发送的电子邮件创建触发器?

标签 salesforce

我想将从工作流程发送的电子邮件更改为发送给其他收件人,即当前用户的经理。我可以通过重建所有工作流程来做到这一点,但我想知道是否有任何方法可以在 EmailMessage 对象的触发器中执行此操作,以便这适用于发送的每封电子邮件。我尝试过这样做,但似乎从工作流发送的电子邮件不会经过此对象。

最佳答案

作为构建触发器的替代方法,您可以在 Eclipse 中进行搜索和替换以添加收件人。

你可以从这个开始

<alerts>
  ...
  <recipients>
    <field>Engineer_s_Email__c</field>
    <type>email</type>
  </recipients>
  <recipients>
    <recipient>jason.bourne@salesforce.com</recipient>
    <type>user</type>
  </recipients>
  ...
</alerts>

然后进行文件搜索并替换(ctrl-h)。搜索 </alerts>并替换为 <recipients><recipient>manager.john@salesforce.com</recipient><type>user</type></recipients></alerts> 。这会给你:

<alerts>
  ...
  <recipients>
    <field>Engineer_s_Email__c</field>
    <type>email</type>
  </recipients>
  <recipients>
    <recipient>jason.bourne@salesforce.com</recipient>
    <type>user</type>
  </recipients>
  ...
<recipients><recipient>manager.john@salesforce.com</recipient><type>user</type></recipients></alerts></alerts>

单击“确定”,系统会将经理添加为所有工作流程电子邮件警报的收件人。

如果您想变得更奇特,请使用正则表达式。

关于salesforce - 是否可以为从工作流程发送的电子邮件创建触发器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9772573/

相关文章:

python - 无法在 lambda aws 中导入 simple_salesforce 包

swift - 从新创建的 salesforce 对象中检索对象 ID

data-structures - 业务分析师的 Salesforce 表关系

java - 为什么我的 SalesForce.com-GoogleApp 无法初始化 com.sforce.ws.ConnectorConfig 类?

salesforce - 无法再使用 Mavensmate 打开/创建我的 Salesforce 项目

javascript - Veeva CRM 中的点击流跟踪

ruby-on-rails - 在整个 Rails 应用程序中使用一个客户端实例进行外部服务

javascript - 多个 If 语句相互抵消? (Javascript)

c# - 使用 REST API 从 Salesforce.com 调用 "Get Updated"记录时出现问题

salesforce - 为什么由 APEX 可调度类发送的 HTML 电子邮件带有空白正文?