Dataverse Entity Generator
Generates structurally compliant Entity.xml files for Microsoft Power Platform solutions, using battle-tested patterns from the working v6.0 solution baseline.
CRITICAL: Why This Skill Exists
Custom Entity.xml files created from scratch frequently fail Microsoft import due to:
- Missing LocalizedNames / LocalizedCollectionNames elements
- PrimaryNameAttribute set on system fields instead of proper string fields
- Missing required system fields (CreatedOn, ModifiedOn, etc.)
- Wrong attribute ordering or missing flags (IsValidForCreate, etc.)
- DateTime fields with invalid Format specifications
This skill prevents ALL of these by generating from a known-good template.
Workflow
- Receive table specification (JSON schema, natural language, or column list)
- Validate inputs against naming conventions and Dataverse constraints
- Generate Entity.xml using v6.0-compliant template structure
- Generate supporting files (Entity.xml, FormXml, SavedQueries if requested)
- Validate output against CMAP validation rules before delivery
Input Specification
Accept any of these formats:
Option A: JSON Schema (preferred)
{
"schema_name": "eap_agents",
"display_name": "Agent",
"display_collection_name": "Agents",
"description": "Registered AI agents in the platform",
"prefix": "eap",
"primary_name_field": "agent_name",
"columns": [
{ "name": "agent_name", "type": "nvarchar", "length": 200, "required": true, "description": "Agent display name" },
{ "name": "agent_code", "type": "nvarchar", "length": 50, "required": true, "description": "Unique agent code" },
{ "name": "agent_type", "type": "picklist", "option_set": "eap_agent_type", "required": true },
{ "name": "is_active", "type": "bit", "default": true, "required": true },
{ "name": "config_json", "type": "ntext", "description": "JSON configuration" }
]
}
Option B: Natural Language
"Create a table called eap_agents with columns for agent_name (text, required), agent_code (text, required, unique), agent_type (choice), is_active (yes/no), and config_json (multiline text)"
Option C: Column List
Just a list of column names and types - the skill infers the rest.
Naming Convention Enforcement
| Element | Rule | Example | Error if Violated |
|---|---|---|---|
| Schema name | {prefix}_{lowercase} | eap_agents | DV001 |
| Column names | {prefix}_{lowercase_underscores} | eap_agent_name | DV002 |
| Publisher prefix | eap_, mpa_, ca_ | - | DV003 |
| Display name | Singular form | "Agent" not "Agents" | DV004 |
| Boolean columns | Is or Has prefix | is_active, has_children | DV005 |
| Primary key | {table}id | eap_agentid | DV006 |
| Lookups | _id suffix on schema | eap_clientid | DV007 |
| Primary name | Must be nvarchar type | agent_name | DV073 |
Entity.xml Template (v6.0-Compliant)
This is the EXACT structure that passes Microsoft import. Do not deviate.
<Entity Name="{schema_name}" LocalizedName="{display_name}" OriginalName="{schema_name}">
<EntityInfo>
<entity Name="{schema_name}">
<LocalizedNames>
<LocalizedName description="{display_name}" languagecode="1033" />
</LocalizedNames>
<LocalizedCollectionNames>
<LocalizedCollectionName description="{display_collection_name}" languagecode="1033" />
</LocalizedCollectionNames>
<Descriptions>
<Description description="{description}" languagecode="1033" />
</Descriptions>
<attributes>
<!-- Primary Key (auto-generated) -->
<attribute PhysicalName="{schema_name}Id">
<Type>primarykey</Type>
<Name>{schema_name}id</Name>
<LogicalName>{schema_name}id</LogicalName>
<RequiredLevel>systemrequired</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>auto</ImeMode>
<IsCustomField>0</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>0</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>0</CanModifyAdditionalSettings>
<IsLogical>0</IsLogical>
<IsValidForCreate>0</IsValidForCreate>
<IsValidForRead>1</IsValidForRead>
<IsValidForUpdate>0</IsValidForUpdate>
<displaynames>
<displayname description="{display_name}" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="Unique identifier" languagecode="1033" />
</Descriptions>
</attribute>
<!-- Primary Name Field (MUST be nvarchar, MUST have IsPrimaryName=1) -->
<attribute PhysicalName="{primary_name_physical}">
<Type>nvarchar</Type>
<Name>{primary_name_logical}</Name>
<LogicalName>{primary_name_logical}</LogicalName>
<Length>{primary_name_length}</Length>
<RequiredLevel>{primary_name_required}</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>auto</ImeMode>
<IsCustomField>1</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<IsPrimaryName>1</IsPrimaryName>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>1</CanModifyAdditionalSettings>
<IsLogical>0</IsLogical>
<IsValidForCreate>1</IsValidForCreate>
<IsValidForRead>1</IsValidForRead>
<IsValidForUpdate>1</IsValidForUpdate>
<displaynames>
<displayname description="{primary_name_display}" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="Primary name field" languagecode="1033" />
</Descriptions>
</attribute>
<!-- SYSTEM FIELDS (required for all entities) -->
<!-- CreatedOn: NO Format element, NO IsPrimaryName -->
<attribute PhysicalName="CreatedOn">
<Type>datetime</Type>
<Name>createdon</Name>
<LogicalName>createdon</LogicalName>
<RequiredLevel>none</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>inactive</ImeMode>
<DateTimeBehavior>UserLocal</DateTimeBehavior>
<CanChangeDateTimeBehavior>0</CanChangeDateTimeBehavior>
<IsCustomField>0</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>0</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>0</CanModifyAdditionalSettings>
<IsLogical>0</IsLogical>
<IsValidForCreate>0</IsValidForCreate>
<IsValidForRead>1</IsValidForRead>
<IsValidForUpdate>0</IsValidForUpdate>
<displaynames>
<displayname description="Created On" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="Date and time the record was created" languagecode="1033" />
</Descriptions>
</attribute>
<!-- ModifiedOn: same pattern as CreatedOn -->
<attribute PhysicalName="ModifiedOn">
<Type>datetime</Type>
<Name>modifiedon</Name>
<LogicalName>modifiedon</LogicalName>
<RequiredLevel>none</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>inactive</ImeMode>
<DateTimeBehavior>UserLocal</DateTimeBehavior>
<CanChangeDateTimeBehavior>0</CanChangeDateTimeBehavior>
<IsCustomField>0</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>0</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>0</CanModifyAdditionalSettings>
<IsLogical>0</IsLogical>
<IsValidForCreate>0</IsValidForCreate>
<IsValidForRead>1</IsValidForRead>
<IsValidForUpdate>0</IsValidForUpdate>
<displaynames>
<displayname description="Modified On" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="Date and time the record was modified" languagecode="1033" />
</Descriptions>
</attribute>
<!-- StatusCode and StateCode follow same pattern -->
<!-- CUSTOM FIELDS inserted here following the same attribute structure -->
</attributes>
<EntitySetName>{schema_name}s</EntitySetName>
<IsDuplicateCheckSupported>0</IsDuplicateCheckSupported>
<IsBusinessProcessEnabled>0</IsBusinessProcessEnabled>
<IsRequiredOffline>0</IsRequiredOffline>
<IsInteractionCentricEnabled>0</IsInteractionCentricEnabled>
<IsCollaboration>0</IsCollaboration>
<AutoRouteToOwnerQueue>0</AutoRouteToOwnerQueue>
<OwnershipTypeMask>UserOwned</OwnershipTypeMask>
<IsAuditEnabled>1</IsAuditEnabled>
<IsActivity>0</IsActivity>
<IsActivityParty>0</IsActivityParty>
<IsAvailableOffline>1</IsAvailableOffline>
<IsChildEntity>0</IsChildEntity>
<IsCustomEntity>1</IsCustomEntity>
<HasNotes>1</HasNotes>
<HasActivities>0</HasActivities>
<AutoCreateAccessTeams>0</AutoCreateAccessTeams>
<EntityColor>#0078D4</EntityColor>
<PrimaryNameAttribute>{primary_name_logical}</PrimaryNameAttribute>
<PrimaryIdAttribute>{schema_name}id</PrimaryIdAttribute>
</entity>
</EntityInfo>
</Entity>
Custom Column Type Templates
nvarchar (Single Line of Text)
<attribute PhysicalName="{physical_name}">
<Type>nvarchar</Type>
<Name>{logical_name}</Name>
<LogicalName>{logical_name}</LogicalName>
<Length>{max_length}</Length>
<RequiredLevel>{required_level}</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
<ImeMode>auto</ImeMode>
<IsCustomField>1</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IsCustomizable>1</IsCustomizable>
<IsRenameable>1</IsRenameable>
<CanModifySearchSettings>1</CanModifySearchSettings>
<CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
<CanModifyAdditionalSettings>1</CanModifyAdditionalSettings>
<IsLogical>0</IsLogical>
<IsValidForCreate>1</IsValidForCreate>
<IsValidForRead>1</IsValidForRead>
<IsValidForUpdate>1</IsValidForUpdate>
<displaynames>
<displayname description="{display_name}" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="{description}" languagecode="1033" />
</Descriptions>
</attribute>
ntext (Multiple Lines of Text)
Same as nvarchar but: <Type>ntext</Type>, no Length element, add <Format>TextArea</Format>
int (Whole Number)
<Type>int</Type>
<MinValue>-2147483648</MinValue>
<MaxValue>2147483647</MaxValue>
decimal
<Type>decimal</Type>
<MinValue>-100000000000</MinValue>
<MaxValue>100000000000</MaxValue>
<Precision>2</Precision>
money (Currency)
<Type>money</Type>
<MinValue>-922337203685477</MinValue>
<MaxValue>922337203685477</MaxValue>
<Precision>4</Precision>
<ImeMode>disabled</ImeMode>
bit (Yes/No)
<Type>bit</Type>
<OptionSetName>{schema_name}_{column_name}</OptionSetName>
<DefaultValue>{0_or_1}</DefaultValue>
datetime
<Type>datetime</Type>
<DateTimeBehavior>UserLocal</DateTimeBehavior>
<CanChangeDateTimeBehavior>1</CanChangeDateTimeBehavior>
<Format>DateAndTime</Format>
CRITICAL: Format must be DateAndTime or DateOnly (PascalCase). Never dateandtime.
picklist (Choice)
<Type>picklist</Type>
<OptionSetName>{option_set_name}</OptionSetName>
Option values must be in range 100000001-100000999.
lookup (Foreign Key)
<Type>lookup</Type>
<LookupTypes>
<LookupType id="00000000-0000-0000-0000-000000000000">{target_entity}</LookupType>
</LookupTypes>
Validation Checklist (run before delivery)
Every generated Entity.xml must pass ALL of these:
| # | Check | Error Code |
|---|---|---|
| 1 | Schema name uses correct prefix (eap_, mpa_, ca_) | DV003 |
| 2 | Display name is singular | DV004 |
| 3 | PrimaryNameAttribute points to an nvarchar field | DV073 |
| 4 | PrimaryNameAttribute field has IsPrimaryName=1 | DV009 |
| 5 | NO system field has IsPrimaryName=1 | DV073 |
| 6 | System datetime fields have NO Format element | (import fail) |
| 7 | Custom datetime fields use PascalCase Format | (import fail) |
| 8 | Entity has LocalizedNames element | DV071 |
| 9 | Entity has LocalizedCollectionNames element | DV070 |
| 10 | Name element has LocalizedName and OriginalName attributes | DV070 |
| 11 | All boolean columns use Is/Has prefix | DV005 |
| 12 | Primary key column ends with Id | DV006 |
| 13 | Option set values in range 100000001-100000999 | DV010 |
| 14 | All GUIDs are lowercase, no braces | GU002, GU004 |
Usage
User: Generate entity for eap_agents with columns: agent_name (text, required),
agent_code (text, required), agent_type (choice), is_active (yes/no), config_json (multiline)
Claude: [reads this SKILL.md]
[generates complete Entity.xml using v6.0 template]
[validates against all 14 checks]
[delivers compliant Entity.xml]
