Salesforce 创建按钮和链接选项 - 用于启动电子邮件模板的自定义 URL

发布于 2024-08-15 15:41:51 字数 138 浏览 4 评论 0原文

我有一个电子邮件模板,我想使用链接/按钮从案例中启动该模板。我在设置 -> 自定义 -> 案例 -> 按钮和链接下看到了选项,我什至看到了需要放置 URL 的位置。我没有看到任何有关如何构建 URL 来启动电子邮件模板的文档。任何帮助你变得伟大

I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

只是一片海 2024-08-22 15:41:51

我不知道 salesforce 是否在任何地方记录了这一点,但我从一些猜测工作中发现:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn

只需将其用作自定义按钮或链接的 url 内容。这适用于您正在尝试做的情况,但我认为这也适用于其他类型的对象。

参数包括 p3_lkid(案例 ID)、p2_lkid(您正在向其发送电子邮件的联系人的 ID)以及 template_id(硬编码为)所需的电子邮件模板。 (您可以通过查看模板设置页面的 url 来找到此 ID)

I don't know if this is documented anywhere by salesforce, but I found from some guess work:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn

Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.

The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)

流年里的时光 2024-08-22 15:41:51

这真的很有帮助。不过,我确实找到了另一种方法。单击您当前拥有的“发送电子邮件”按钮。复制 URL 并添加 &template_id=您的模板 ID

原始 URL 中还会显示另一个 ID 号。将其更改为您想要的动态字段。

例如:

复制“发送电子邮件”中的 url:https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1

添加 &template_id=您的模板 ID看起来像这样:

/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID 

删除另一个 id(它是您用来发送电子邮件的对象 - 所以在这种情况下,我希望能够直接从营销活动发送电子邮件)并替换为动态字段:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID

瞧!它应该有效!

This was really helpful. I did, however, figure out another way to do it. Click on the "Send an Email" button you currently have. Copy the URL and add &template_id=YOUR TEMPLATE ID.

There is one other ID number that will show up in the original URL. Change that to be the dynamic field you want it to be.

For example:

Copy url from "Send Email": https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1

Add &template_id=YOUR TEMPLATE ID so it looks like this:

/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID 

Remove the other id (it's the object you used to send the email - so in this case, I was wanting to be able to send an email directly from a Campaign) and replace with the dynamic field:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID

And voila! It should work!

緦唸λ蓇 2024-08-22 15:41:51

阿拜耶的回答很好。但是,如果模板包含解决方案附件“{!Case.Solution_Attachments}”,则不会包含附件,除非您将 new_template=1 参数添加到 URL 中,从而使其:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1

Abeyer's answer is good. However, if the template contains solution attachments "{!Case.Solution_Attachments}" the attachments will not get included unless you add the new_template=1 parameter to the URL making it:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文