• Contact
  • Newsletter Archive
CRM Developer's How-To
  • Contact
  • Newsletter Archive

Articles Tagged: C#

How to send an email using a mail template and connect it to a system entity, e. g. an Incident

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 […]

Read More →

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!

Read More →

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!

Read More →

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:

Read More →

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.

Read More →

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.

Read More →

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.

Read More →

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.

Read More →

Subscribe to our Newsletter

Check your inbox or spam folder to confirm your subscription.

Recent Posts

  • My form’s Business Rule doesn’t work!
  • How to register a new plugin in an existing assembly
  • How do I batch upload document templates?
  • How do I change the header color of my CRM environment and add a logo image? [NEW LOOK]
  • How do I change the header color of my CRM environment and add a logo image? [OLD LOOK]

Archives

  • June 2024
  • January 2024
  • May 2023
  • April 2023
  • March 2023
  • February 2023

Categories

  • Getting Started with Dynamics 365 CRM development
  • General Dynamics 365 CRM development
  • Plugins
  • XRM Toolbox
  • C# code
  • Javascript
  • Templates
  • Deployment
  • Errors & Bugs
  • I'm sorry Dave! I'm afraid you can't do that!
  • Contact
  • Newsletter Archive
© Copyright 2025 CRM Developer's How-To