使用 MS Dynamics Crm 2011 中的工作流程创建电子邮件并动态填写“收件人”字段场地
我正在从事 Ms Dynamics Crm 2011 开发,遇到以下问题。 我的情况:
我希望能够在实体“MyEntity”记录上的特定状态字段发生更改后自动发送电子邮件。 “MyEntity”有一个电子邮件字段。我尝试创建一个工作流程,在状态更改后将电子邮件发送到“MyEntity”记录的电子邮件字段地址。我的问题是,我无法在电子邮件创建工作流程中将此“MyEntity”电子邮件字段地址添加到“收件人”字段。我需要以某种方式在工作流程中指定动态添加“收件人”字段,即来自特定“MyEntity”的相关电子邮件地址。这可能吗?有解决方法吗?我想这可以通过插件来完成,但现在我正在尝试避免使用插件解决方案。
预先感谢
约翰
I'm working on Ms Dynamics Crm 2011 development and I encountered following problem.
My situation:
I want to be able to automatically send an Email after a change on a specific status field on a record of the Entity "MyEntity". "MyEntity" has an Email-field. I try to create a workflow which sends an Email to the Email-field address of the "MyEntity" record after the status has been changed. My problem is that I can't add in the Email Creation workflow to the "To" field this "MyEntity" Email-field adress. I need to somehow specify in the workflow to dynamically add the "To" field, the relating Email address from the specific "MyEntity". Is that possible? Is there a workaround for that? It could be done with a plugin I guess, but by now I'm trying to avoid the plugin solution.
Thanks in advance
John
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,你应该能够。首先转到解决方案,调出您的实体,转到字段,调出您的电子邮件字段并确保格式为电子邮件。发布。
解决方法:如果您有超过 1 个电子邮件格式文本字段,请暂时更改其他字段(更改为电子邮件中的文本)并发布。否则,下一步将不明确,并且当该实体用于电子邮件时,我们无法控制 CRM 将哪个字段设置为要使用的电子邮件。
在解决方案框架中,选择树中的实体节点。在“通信和协作”下,选中“发送电子邮件”复选框(如果电子邮件字段不存在,则会创建一个)。保存/发布。
如果您有超过 1 个电子邮件格式文本字段,请解决上述问题。将它们改回电子邮件。发布。
在工作流程中,选择您的“收件人”字段。在“发送电子邮件”步骤下,选择“设置属性”。选择“收件人”字段。在表单助手中,您应该无法选择您的实体。注意:您将绑定到“密钥”字段,而不是特定的电子邮件字段。
这仅适用于自定义实体上的单个电子邮件字段。无法将文本字段用作 CRM“收件人”字段中的地址。
Yes, you should be able to. First go to Solutions, bring up your entity, go to Fields, bring up your e-mail field and ensure the Format is e-mail. Publish.
Work around: If you have more than 1 e-mail Format text field, change the others temporarily (to text from e-mail) and Publish. Otherwise, the next step is ambiguous and we don't have control over which field CRM sets up as the email to use when this entity is used for e-mail.
In the solution frame, select your entity node in the tree. Under Communication and Collaboration, check the box 'Sending e-mail (If an e-mail field does not exist, one will be created).' Save/Publish.
Fix the work around above if you had more than 1 e-mail format text field. Change them back to e-mail. Publish.
In Workflow, select your To Field. Under the Send e-mail step, select 'Set Properties.' Select the 'To' field. In the form assistant you should not be able to select your entity. NOTE: You will bind to the 'Key' field and NOT to the particular e-mail field.
This only works for a single e-mail field on your custom entity. There is no way to use a text field as an address in a CRM 'to' field.
不幸的是你不能。
开箱即用的电子邮件中的收件人字段仅接受
因此为了实现目标,您必须编写自定义工作流程活动(可选:采用自定义输入参数中的文本字段)并在工作流程中引用它或开发插件。
插件示例代码:
有关详细信息,请查看此帖子 Crm 2011:工作流程 - 发送电子邮件问题
Unfortunately you cannot.
Out of the box the To field in an email accepts only
So in order to achieve the goal , you will have to write a custom workflow activity (optional : taking the custom text field in your input parameter )and refer it in your workflow or develop a plug-in.
Sample code for Plugin:
For more information check this post Crm 2011 :Workflow - Sending email problem