object_patterns
Analyze and recommend D365FO form patterns, validate XML structure, and retrieve table/field patterns for optimal code alignment.
Instructions
Pattern toolkit. Choose a domain:
• table → common field types, index patterns and relation structures for D365FO tables. Filter by tableGroup (Main, Transaction, …) or similarTo a given table.
• form → form-pattern toolkit; pick an action:
analyze → pattern advisor + usage analysis. RECOMMEND (preferred for a new form): pass recommend={entityKind, hasHeaderLines, fieldCount, usageIntent, tableName} for the right pattern via the Microsoft decision tree + reference forms to clone. Or filter by formPattern / dataSource / similarTo.
spec → full structure spec of a pattern or sub-pattern (required hierarchy/ordering, allowed children, reference forms, lifecycle). Call after analyze, before building.
validate → structural validator of AxForm XML (<50 ms, offline): container hierarchy/order, sub-patterns, PatternVersion. Returns FP001-FP010 violations. Call before action=create on d365fo_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | [validate] Complete AxForm XML to validate. Provide this OR formName/filePath. | |
| limit | No | [analyze] Maximum number of pattern examples (default: 10) | |
| action | No | [form] Which form-pattern operation to run. repair = auto-fill missing required controls. | |
| domain | No | table = table field/index/relation patterns; form = form-pattern toolkit (set action). Optional — inferred from the other params (action/pattern/xml/formName → form; tableGroup → table). ⚠️ This is NOT a free-form "pattern type": a concept like "number-sequence"/"SysOperation" belongs to get_knowledge, not here. | |
| pattern | No | [spec] REQUIRED. Pattern name (id, xmlName, or alias) — e.g. "SimpleList", "DetailsMaster", or a sub-pattern like "FieldsFieldGroups". | |
| filePath | No | [form/validate] Explicit path to an AxForm XML file (e.g. a freshly created form not yet indexed). | |
| formName | No | [validate] Name of an indexed form — XML is loaded from the metadata store. | |
| recommend | No | [analyze] Pattern advisor: describe requirements, get a recommended pattern + reference forms to clone. | |
| similarTo | No | [table] table name to find similar table patterns; [form/analyze] form name to find similar form patterns. | |
| dataSource | No | [form/analyze] Table name - find forms using this table | |
| tableGroup | No | [table] Table group type to analyze (choose one). | |
| formPattern | No | [analyze] D365FO form pattern to analyze |