Find Usages
Find Usages lists every place an object, field, procedure, variable, key or other declaration is used. The results open in the Usages window, grouped by object and by the procedure or trigger that holds each usage.
Starting Find Usages
- Find Usages in the context menu of an object in the Object index, or of the object heading in the Object view.
- Find Usages in the context menu of a declaration in the object view, such as a field, a procedure, a variable or a key.
- Find all usages of this object…, Show where it uses this object… or Show where this object uses it… in the context menu of a row on the Dependencies tab.
- Find Usages in the actions of a result in Universal Search: select the result and press Tab.
- Search in the System Functions window.
- Show details… on a relation in the Explore Table Relations window.
- Find Usages in the context menu of a name in the Usages window itself: right-click the procedure, trigger or other declaration that holds a usage. It is disabled without a license and for declarations that Find Usages does not cover.
Without a license, the menu item reads Find Usages (Not enabled in this edition) and is disabled.
The Usages window

| # | Name | Description |
|---|---|---|
| 1 | Query | What was searched: select all direct usages of the target, and in the object searched when there is one. For system functions it reads select the functions applied to the object. |
| 2 | Search | Keeps the usages whose code line contains the text, ignoring case. |
| 3 | Shown usages | Currently displaying all (N) usages, or Currently displaying X of N usages in the accent color when the search or a filter hides some. |
| 4 | Toggle filter panel | Shows or hides the filter panel (Ctrl+O). Enabled for the usages of a field and for system functions on a record. |
| 5 | Collapse all | Collapses every node. |
| 6 | Expand all | Expands every node. |
| 7 | Copy | Copies the shown usages. See Share usages with a colleague. |
| 8 | Pinned rows | The object and declaration of the top usage stay pinned at the top while you scroll. Pinned rows expand and collapse like the rows below them. |
| 9 | Usage | The code line with the usage, under its object and the procedure or trigger that holds it. Select it to go to the usage in the workspace window. |
| 10 | Filter panel | Narrows the usages of a field, or of system functions on a record. See Field filter and Temporary record filter. |
Each usage shows the path to it, from its object down to its code line. Right-click a step of the path: Navigate goes to that step, and Toggle detail switches the path between a one-line trail and the full indented path. The results of Code Lines and Text Constants show their paths the same way.
Field filter

| # | Name | Description |
|---|---|---|
| 1 | Show where assigned and read | Lists every usage of the field, with the include options below it. |
| 2 | Save as default | Saves the include options as your default for assigned and read. |
| 3 | Include options | What the list takes in besides code; see the table below. |
| 4 | Show where assigned only | Lists only where the field is given a value, with its own include options and save button. |
For the usages of a field, the filter panel chooses between all usages and assignments only. Each choice has its own include options, all checked by default. The save button beside each choice keeps its current options as your default for the next search.
| Option | Under | Includes |
|---|---|---|
| Include Properties | Assigned and read | Usages in properties. |
| Include Key Definitions | Assigned and read | Keys that contain the field. |
| Include TransferFields | Both | TRANSFERFIELDS calls on the field's table. |
| Include Clear(Record|Field) | Both | CLEAR of the record or of the field. |
| Include Message|Confirm|Error parameters | Assigned and read | The field passed to MESSAGE, CONFIRM or ERROR. |
Temporary record filter
When you find the usages of system functions such as INSERT or DELETE on a table,
the filter panel tells temporary records from physical ones. Physical means a record declaration that is
not temporary.

| # | Name | Description |
|---|---|---|
| 1 | Show all usages (temporary and physical) | Lists every usage. The default. |
| 2 | Zoom in on physical usages | Leaves out usages on temporary records. Physical global and local variables and physical by-value parameters are always included. |
| 3 | Usages of by-reference parameters | With Zoom in on physical usages: Include all (whether declared physical or temporary) (the default) or Only include if declared physical. |
A by-reference (VAR) parameter declared TEMPORARY can still be passed a physical
record: C/AL does not enforce the declaration. Keep Include all to be sure no physical
usage is left out.
A record counts as temporary when:
- It is declared
TEMPORARY. - It is the own record (
Rec,xRec, or a bare call such asINSERT) of a page or form withSourceTableTemporary=Yes. A record variable over the same table withoutTEMPORARYstays physical. - It is a report data item or an XMLport table element with
UseTemporary=Yes.
What is found
Besides code, Find Usages reads the places C/AL names a declaration outside code:
| Where | What is found |
|---|---|
Report DataItemLink | The field on the left as a field of the data item's own table, and each FIELD(…) as a field of the data item it links to: the one DataItemLinkReference names, otherwise the nearest enclosing data item. Query DataItemLink and XMLport LinkFields are not searched. |
| View and link properties | Fields in properties such as RunPageView, RunPageLink, SourceTableView, SubPageLink, DataItemTableView, RunFormView, RunFormLink, SubFormView and SubFormLink. |
| Event subscribers | Find Usages on a subscriber lists the publisher it subscribes to: the publisher procedure, or for a validate event the field it names. A subscriber to a record event such as OnAfterInsertEvent lists no publisher. |
| Field usages and validate events | The usages of a field include the OnBeforeValidateEvent and OnAfterValidateEvent subscribers that name it. |
| XMLport node names | Find Usages on an XMLport text element, attribute or table element lists where code uses it. |
Find where a field is written
Use this when a field holds a value you did not expect and you need the code that sets it.
- Open the table in the object view and right-click the field.
- Choose Find Usages. The Usages window opens.
- Press Ctrl+O to open the filter panel.
- Choose Show where assigned only. Clear Include TransferFields and Include Clear(Record|Field) to see only direct assignments.
- Select each usage to read it in context.
The window lists the assignments only; the count at the top tells how many of all usages they are.
Share usages with a colleague
Use this to hand a list of usages to a colleague or keep it in a spreadsheet.
- Narrow the list with the search box and the filter panel until it shows what you want to share.
- Select the copy button.
- Paste into a spreadsheet or a message.
The copy holds the usages the window shows, as tab-separated text with the columns Object,
Context and Code.
Behavior
- Background search: the search runs as a background task. When it finds nothing, a notification says No usages found and no window opens.
- Window title: names the target and the count, such as Usages (Customer) | 214 usages, after the product name.
- Navigation: selecting a usage goes to it at once; double-clicking does the same.