First you need to create an email template. Go to Settings | Templates | Email Templates: Then click the New button and select the desired entity. If the entity you want to connect the email template to is not shown in the list, just select Global. It is not possible to extend the list of […]
Articles Tagged: C#
How to send an email with attachment and connect it to a system entity, e. g. an Incident
Sample code to send an email with custom attachement, connected to an Incident entity: Once the email has been sent, it should be visible as an email activity in the selected incident entity’s timeline.Observe: The sample supplied requires early bound entity classes for ActivityParty, Email, ActivityMimeAttachment, SendEmailRequest and SendEmailResponse!
How to send a simple email and connect it to a system entity, e. g. an Incident
Sample code to send a simple email connected to an Incident entity: Once the email has been sent, it should be visible as an email activity in the selected incident entity’s timeline.Observe: The sample supplied requires early bound entity classes for ActivityParty, Email, SendEmailRequest and SendEmailResponse!
How do I update an “EntityCollection” type property using late binding?
Example: The Email entity has a From property that is an EntityCollection of ActivityParty entities. Same goes for the To property btw. The following sample snippet will set the Email entity’s From address to a Queue entity using late binding:
Find and enumerate all Teams a given System User is member of
Sample code to find all Teams a System User is member of: Observe: The above code requires a generated XRM early bound entity file for the Team and TeamMembership entities.
Find and enumerate all Security Roles for a given Team
Sample code to find all Security Roles for a Team: Observe: The above code requires a generated XRM early bound entity file for the Role and TeamRoles entities.
Find and enumerate all Security Roles for a given System User
Sample code to find all Security Roles for a System User: Observe: The above code requires a generated XRM early bound entity file for the Role and SystemUserRole entities.
Programmatically add a Security Role to all System Users regardless of Business Unit
Sample code to add an existing Security role to all System Users: Observe: The above code requires a generated XRM early bound entity file for the Role and SystemUser entities.