Reputation: 218
When sending emails from Dynamics CRM, we want to send e-mails to only accounts and contacts. However, the built-in e-mail activity entity allows for users and leads to be added to the recipients as well.
According to Dynamics CRM Activity Parties, there are 12 types of activity parties. The ToRecipient type "specifies the recipient in the To field" and you can select Account, Contact, Lead and User. On the same page, there is a Customer party type from where you can select only Account and Contact.
According to Activity Party Entity, the Customer party list is not available as a party list for the e-mail entity. We'd prefer to use the built-in e-mail entity instead of customizing our own, so it seems to me that the remaining option is to limit the ToRecipient party list to Accounts and Contacts. Can this be done, and have I missed other ways to get around this issue?
Upvotes: 1
Views: 2168
Reputation: 11
You can add a CustomView to a lookup field. The partylist is a lookupfield, so this should work, although I think it will need some thought.
Sorry for not being able to provide a full answer but maybe the addCustomView will give you some light.
Upvotes: 0
Reputation: 1888
I have gotten the same request before, but couldn't find a great way to limit this. You could throw an error upon creation through a plugin if they add a party of a different type. See the link below for an example that could get you started.
How to get the Contact Guids from a PartyList in a Plugin?
Upvotes: 0