labels
Read and write D365 F&O label files: search labels, fetch translations, create, update, or rename label IDs across all languages.
Instructions
Unified label operations — read and write. Choose an action:
• search → full-text query across indexed label files.
• info → all translations for a labelId; without labelId lists label files (with labelFileId: physical .label.txt path per language).
• create → add a new label to an AxLabelFile across every language .label.txt (write). Label IDs describe MEANING — never add a model prefix; target the model's ORIGINAL label file, never an …_Extension… file. Pass createIfMissing=true to reuse an existing label instead of reporting it — one call, no search first. Bulk: pass labels:[{labelId, translations}, …] with shared labelFileId/model at top level.
• update → overwrite the text of an EXISTING label; same args as create with corrected translations[] (write).
• rename → rename a label ID across .label.txt + X++ + XML + index. Use dryRun=true first (write).
Write plumbing (paths, languages, sortLabels, allowExtensionLabelFile…) is auto-resolved; override it via get_knowledge(kind="op-spec", topic="labels").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | [search|info|create|update|rename] Model that owns the label file (e.g. ContosoExt). | |
| query | No | [search] REQUIRED. Search text — matches label ID, text and developer comment. ARRAY = try several phrasings in ONE call. | |
| action | Yes | Label operation to perform. | |
| dryRun | No | [rename] Preview changes without writing anything. | |
| labels | No | [create] OPTIONAL bulk mode — create several labels in one call; shared fields (labelFileId, model, languages, paths…) stay at the top level and top-level labelId/translations are ignored. A failed entry does not abort the batch. | |
| params | No | Optional write plumbing (packagePath, projectPath, languages, sortLabels, allowExtensionLabelFile, …) — all auto-resolved when omitted. Contract: get_knowledge(kind="op-spec", topic="labels"). | |
| labelId | No | [info] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files. | |
| verbose | No | [search] Default one line per label; true = full multi-line block. | |
| language | No | [search] Language/locale (default: en-US). Examples: cs, de, sk. | |
| maxResults | No | [search] Max labels listed (default 10); a truncated set reports how many more matched. | |
| newLabelId | No | [rename] REQUIRED. New label ID — must be alphanumeric, no spaces. | |
| oldLabelId | No | [rename] REQUIRED. Current label ID (e.g. MyOldField). | |
| labelFileId | No | [search|info|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). For a NEW label file this ID is the MODEL name, never the bare EXTENSION_PREFIX. | |
| translations | No | [create] REQUIRED for single-label create (omit when using labels[]). Translations for each language. Provide at least en-US. |