Create Email with a workflow in MS Dynamics Crm 2011 and dynamically fill the “To” field

最后都变了- 提交于 2019-12-06 13:45:32

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.

Unfortunately you cannot.

Out of the box the To field in an email accepts only

  • Account
  • Contact
  • Facility/Equipment
  • Lead
  • Queue
  • User

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:

SendEmailRequest req = new SendEmailRequest();
req.EmailId = emailId;//ID of created mail
req.TrackingToken = "";
req.IssueSend = true;

For more information check this post Crm 2011 :Workflow - Sending email problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!