serving the solutions day and night

Pages

Thursday, February 21, 2013

CRM Metadata

Metadata is defined as data about data. MS Dynamics CRM uses a metadata driven architecture to provide the flexibility to create custom entities and additional system entity attributes.
MS Dynamics CRM retrieves the record data from the metadata (entities, attributes, relationships, and option sets.), which in turn retrieves information from the underlying system data. MS Dynamics CRM stores its underlying system data in a relational database using Microsoft SQL Server.

MS Dynamics User Interface  ->  Metadata ->  Underlying System Data (SQL Server)

The entity metadata controls the grid and form layout, and how navigation options are presented. The metadata makes heavy use of MS Dynamics CRM Web services and XML data formats.

Make changes directly to CRM database in Microsoft SQL Server, risk of damaging the metadata and creating errors in your system.

Metadata object
Entity - An entity (table) is a container for data , such as Accounts, Contacts, Leads, and Opportunities. Each entity contains a set of attributes (fields), such as a phone number for a contact, is a field of the entity.

Default Dynamics CRM contains more than 100 system entities, three types of entities are:
  1. System - Dynamics CRM uses more than 100 non-customizable system entities (such as Privilege, License, and Calendar) to manage the internal operations of the software. You cannot add, edit or delete these entities from the system.
  2. Customizable  - Dynamics CRM includes more than 50 customizable system entities (such as Account, Contact, User,..). These You can add and edit fields,  but you cannot delete these entities from the system.
  3. Custom - You can create, modify, and delete custom entities. 

Attribute - An attribute is a container for a piece of data in an entity. You can customize the following data for custom and customizable entities: Forms, Views, Charts, Messages (errors or alerts).

Fields - Every entity contains one or more fields, two types of fields: System (CRM prevents you from deleting and you can modify some system field properties, such as the requirement level), Customizable and Custom (You can add or delete, but you cannot add custom fields to system entities).

CRM stores system fields in the base tables (for example, ContactBase). All custom fields are stored in a SQL Server table separate from the system fields (8,060 bytes for example,  ContactExtensionBase).

Requirement Levels - Business Required (red asterisk), Business Recommended (Blue plus sign), No Constraint

Data Types - two options (Up to 1 bytes), date and time (8), option set ( 4), whole number (4) , floating point number (8), decimal number (13), currency (8), single line of text ((n) n × 2, where n is the length of the nvarchar field), multiple lines of text ((n) n × 2), Lookup 16.

System Data Types - Status Reason, status, Primary Key, Owner, Time Stamp.


Relationship - A relationship defines an association between two entities: one-to-many, many-to-one, many-to-many, and self-referential.

MS Dynamics Entity Relationship

Option Set - An option set defines a set of options ( a series of names and associated values)  provided for a picklist. Users see a drop-down list on the form. Global option sets that can be used multiple times on an entity or shared across multiple entities.



Option - An option is one of the values available in an option set. Each option in an option set has a unique integer value and an associated set of localized labels. Stores data as one of two values, 0 or 1.

When renaming an entity - Rename the entity view names, Update form & Navigation labels, Change system messages as appropriate, Modify any reports. After making these changes, remember to publish all of the entities you customized.


Option Set Label in Database
'xxxxx_MSCRM' database
Select * from FilteredStringMap

No comments: