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: Code Sample
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!
Two ways to change the default “From” email address to a Queue for Case/Incident emails
A common scenario in Dynamics 365 CRM is that you have a mail queue where the customers can send support requests. When a mail is received in the queue, a Case/Incident is automatically created and the mail attached. When your support staff replies to that mail, it will be from their personal mail address. So […]
How do I get the label text for an OptionSet parameter value?
Entity fields that have an OptionSet data type contains an integer value and a string label. You will mostly use the integer value when you use the field value in your code, no matter if you use the standard late bound method, for instance in your CRM plugins: … or if you use early 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.