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:
All posts by CRM Master Developer
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 […]
How do I create an entity field of EntityReference type that can hold more than one type of entity?
In Dynamics 365 CRM you can add a field to an entity that has the data type “Customer”. In that field, the user can choose if he or she wants to select an Account or a Contact. But how can you achieve something like that? Create a field that can hold an EntityReference to one […]
How do I create an entity field of Guid value type?
It is of course possible to create a field on an entity that holds a reference to another entity by using the entity field data type “Lookup”. The field will then contain an EntityReference consiting of the referenced entity’s logical name and it’s id in Guid format. But what if you want to store a […]
Show/Hide an embedded Web Resource based on an entity property
I showed you in an earlier post how to embed a web resource in the main Case page (Link can be found under “Related posts”). Now I want to take it one step further and show you how to hide and show this web resource based on a Case property. You probably think: That’s easy. […]
Embed a Web Resource in an Entity page
You can get a long way using Dynamics 365 CRM’s built-in functionality, but every once in while there may be special cases where it just doesn’t cut it. Then it’s good to know that you can embed Web Resources in the Entity page UI where you can built extra functionality using html and javascript. You […]
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.