find_references
Locate all references to X++ classes, methods, fields, tables, enums, EDTs, or labels. Scope method searches by declaring type to avoid over-reporting.
Instructions
Find all references (where-used) to a class, method, field, table, enum, EDT, or LABEL. For a method, SCOPE it to its declaring type — pass "Owner.method" (e.g. "SalesTable.initFromSalesQuotationTable"), set ownerName alongside a bare method name, or pass an AOT path ("/Tables/SalesTable/Methods/initFromSalesQuotationTable"). A bare method name (no owner) matches that name on every type and over-reports. For a label, pass the label id as targetName (e.g. "@WAX2194" or "@MyLabelFile:MyLabel"); results span every referencing object type (tables, forms, EDTs, enums, reports, menu items, …), not just code, and require the xref database (DYNAMICSXREFDB, full server mode).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of references to return | |
| ownerName | No | Declaring table/class/form that owns the method, when targetName is the bare method name. Scopes the where-used to that single type. | |
| targetName | Yes | Target name. Methods: see the scoping rule in the description above. Labels: the id exactly as written — "@WAX2194" or "@LabelFile:LabelId". | |
| targetType | No | Scopes a bare name to that type. An enum value: "Enum::Value" with "enum"; an index or field group: "Table.Name". |