Microsoft Dynamics® CRM Training
An error occurred while loading the video. Please try again.
This video is designed as in introduction to advance customizations and configurations for the system customizer or system administrator of Microsoft Dynamics CRM Online.
The video describes the process of creating a custom entity, including editing the form for the entity, creating relationships with other entities, and creating new attributes or fields for the entity. Custom entities are useful for capturing data that is not already captured by the default entities in CRM Online. For the purposes of demonstration, our custom entity will be one that will hold data about an imaginary product our imaginary company sells: software subscriptions.
To begin, navigate to Settings > Customization > Customizations and click Customize the System. The Solution window will open for the Default Solution. You should see Solution: Default Solution near the top. As covered in a previous video, a solution is a set of components that can be imported or exported, and the Default Solution is the set of all components currently present in the system.
In the navigation pane on the left side of the Solution window, click the Entities component. This will cause the right panel to display a view of the entities currently published in the Default Solution. To create a new (custom) entity, click New in the tool bar above the right panel.
When the Entity: New window opens, begin defining the new entity. The fields with red asterisks are required.
Enter the Display Name for our new entity as "Software Subscription". Enter the Plural Name as "Software Subscriptions". These two names are the names that will appear generally throughout the CRM Online interface whenever this entity is mentioned. You'll notice that the Name field is filled automatically, based on the display name you entered above. This is the entity's "logical name". Logical names are only visible in the customization areas of CRM Online. The logical name never changes once set, even when the display names are revised or translated to other languages. Logical names for custom entities always begin with a prefix. The default prefix is "new_". It is possible to edit the non-prefix portion of the logical name when creating the new entity, but it is usually useful to keep the default, so let's do that. The logical name for our example custom entity should now read as "new_softwaresubscription".
Set Ownership to Organization. The implication of this is that software subscription records will not be owned by any individual in the company. Later, we'll relate the Software Subscription entity to the Account entity so we can track which subscriptions each account has, and Accounts can of course be owned by individual salespeople.
Do not check Define as an activity entity. (CRM Online 2011 allows you to create custom activity entities using this checkbox.)
Areas that display this entity shows the "areas" where this entity should appear in the CRM Online interface (using the Plural Name discussed above). Since our custom entity is related to sales of our imaginary company's imaginary product, check Sales. Check Workplace as well. As covered in a previous video, "areas" correspond to the big buttons in the lower portion of the navigation bar on the left side of the main CRM Online screen, and correspond to what we like to call the modules of CRM Online. Areas are further divided into groups and subareas in the upper portion of the navigation bar. When viewing CRM Online in Microsoft Office Outlook, the areas would be represented as the higher level folders in the nested folder structure.
Options for Entity
Some of the options under Communication and Collaboration cannot be changed once set. Let's look at these options carefully before saving the entity.
Notes (includes attachments) This option allows users to type notes into a record of our entity, and attach files. Keep it checked.
Activities Check this option to allow a record of this entity to be related to a record of any of the activity entities, such as a phone call or e-mail, presumably because a customer might call in about a subscription, and we'd like to be able to track that.
Connections Uncheck this option for the purposes of this example.
Sending e-mail (If an e-mail field does not exist, one will be created) Uncheck this option for the purposes of this example.
Mail Merge (This option can be changed later. You can leave it checked for now.)
Document Management (This option can be changed later. You can leave it checked for now.)
Queues Uncheck this option for the purposes of this example. If this were the type of entity that required action, such as an activity, it would make sense to enable queues.
Duplicate Detection Leave it unchecked for now.
Auditing Leave it unchecked for now.
Outlook & Mobile
Check all of the options under this heading so that the entity is visible in Mobile Express and in the reading pane in Microsoft Office Outlook, and so that records of the entity can be edited offline.
Now we can save our entity.
Click Save (and keep the window open). You'll notice that the window name changes to "Entity: Software Subscription" instead of Entity: New, and the icons under the Common section in the left pane are now active, giving us access to other aspects of this entity, including relationships to other entities.
Let's create a relationship between our Software Subscription entity and the Account entity (representing customers who will buy our subscriptions). The relationship choices are 1:N (one to many), N:1 (many to one), and N:N (many to many). We want each customer to be able to have multiple software subscriptions, so we know it's going to be either 1:N or N:1. Relationships are always notated with the current entity on the left. We therefore we want the N:1 relationship.
Click N:1 Relationships in the left pane. The Relationship: New window opens.
Most of the fields are required. Let's go through them.
Primary Entity The primary entity is the entity that is the 1 in a 1:N or N:1 relationship. This is easy to remember because the word prime means 1. Use the drop down menu to choose "Account" as the Primary Entity in the relationship.
Related Entity You'll notice that this is already set to the current entity.
In the Lookup Field section, Display Name determines the text that will appear in the Software Subscription form next to a lookup field (a field with a magnifying glass icon) that is used to identify the Account record in this relationship. Enter "Account". You'll notice that the Name field is automatically filled in based on what you typed ("new_AccountId").
The section called Navigation Pane Item for Primary Entity refers to the Account entity because the Account entity is the primary entity in this relationship (the 1 in N:1). The Display Option field determines how the Software Subscription entity will appear in the navigation pane of the Account entity form. Keep the default choice ("Use Plural Name"), meaning it will be appear as "Software Subscriptions". The Display Area field determines which area Software Subscriptions will appear under in the navigation pane of the Account entity. Keep the default setting, "Details".
The Relationship Behavior section determines how Software Subscription records are affected when certain actions are taken on related records of the primary entity (Account). There are four choices in the Type of Behavior drop down list. Each choice changes the settings for the other six fields representing the actions. Let's choose "Parental", so that when any of these actions is taken on the Account record, that action cascades to (is also performed on) any related Software Subscription records. For example, if an Account record is deleted, all Software Subscription records related to that Account are also deleted, preventing orphaned Software Subscription records from being retained in the database.
Save and Close the relationship window.
Let's work on the form for our custom entity. In the navigation pane of the Entity: Software Subscription window, under Common, click Forms, and then open the Main form.
As we covered in a previous video, a form is simply a display for an entity's fields (also called attributes). The system customizer or system administrator can choose which fields to display on the form and where to display them. Fields still exist in the entity, and can hold real data in a record of that entity, whether or not they are displayed on the form. Many system attributes are created automatically when a custom entity it is created, most of which are not displayed on the form.
To display a field in a form, Drag a field from the Field Explorer pane (on the right) to the editor in the middle pane. (You'll know you're in the editor because of all the dotted-line rectangles.) Tip: Watch for the red line indicating where the field will be placed before you drop it.
Drag and drop the Account field onto the Main form for the Software Subscription entity. Save and Close the (form editor) window.
Now let's create a new attribute for the Software Subscription entity and display it on the form. In the navigation pane of the Entity: Software Subscription window, under Common, click Entities. Click New above the right pane. When the Field: New for Software Subscription window opens, give the attribute a Display Name of "Registration Date". Leave the other choices in the Schema section at their default values. In the Type section, set the Type to "Date and Time" and the Format to "Date Only". Save and Close the window.
Reopen the form editor, and you'll see the new Registration Date field available in the Field Explorer pane to be dragged onto the form to display it. Do so.
In CRM Online, there is a shortcut for creating new attributes directly from the form editor. Let's create another field using this method. Click New Field at the bottom of the Field Explorer pane. The Field: New for Software Subscription window opens again as before. Give the field a Display Name of "Effective Date". Leave Requirement Level set to the default "No Constraint" meaning the field is not required to contain data in order for a record of this entity to be saved. Set Type as "Date and Time". Save and Close the window. In the form editor window, drag this new field onto the form as well. Save the form.
Customizations must always be published before they can be used. In the Entity: Software Subscription window, click Publish in the tool bar along the top. Save and Close the window.
Let's see what we've done. The site map has changed. You should now be able to navigate to Sales > Extensions > Software Subscriptions in the CRM Online navigation pane. (You may have to refresh the page first by tapping the F5 key.) We don't have any Software Subscription records yet (we've only defined the entity). Let's create one. The Account entity is now aware of the relationship to Software Subscriptions so let's create one through an Account record. Navigate to Workplace > Customers > Accounts and open any account record. You should now see Software Subscriptions in the navigation pane for the Account form, under Related > Common. Click it and then click New. When the Software Subscription: New window opens, notice that the Account field is already filled in with the name of the current account record, and the two fields we added, Registration Date and Effective Date are ready to take data. Fill the fields and Save and Close the window. This new software subscription is now listed under Software Subscriptions for the current Account record. When we return to Sales > Extensions > Software Subscriptions (listing all the Subscription records in the system), we'll see the one we just entered. We could also create a new Software Subscription record from this page by clicking New. If you do so, when the Software Subscription: New window opens, you'll notice that Account is not pre-filled and must be indentified manually because we didn't create it through an Account record.
This concludes Advanced Configuration 01.
Thank you very much for your time.