Code Lines
The Code Lines window searches the text of C/AL code: the bodies of procedures and triggers, and the Documentation trigger. Use it for text that is not a declaration, such as a literal message, a comment or a change marker.
Opening Code Lines
| How | Scope |
|---|---|
| Search › Code lines… (Ctrl+Shift+F) | All |
| Search › Code lines (Current Object)… (Ctrl+F) | This |
| Search code in Universal Search | All |
| Search code for "…" in Universal Search, or Ctrl+Shift+F while Universal Search is open | All; searches at once for the text you typed |
The Code Lines window

| # | Name | Description |
|---|---|---|
| 1 | Search scope | This: the object open in the workspace (Ctrl+3). Filtered: the objects the object index shows (Ctrl+2). All: every object in the store (Ctrl+1). |
| 2 | Search box | The text to find; see Wildcards. Press Enter to search. |
| 3 | Search | Starts the search. While it runs, Cancel takes its place and a progress bar under the status line shows how many of the objects in scope are searched. |
| 4 | Status | See Status messages. |
| 5 | Object type chips | Hide or show the results of one object type. See Results and preview. |
| 6 | Copy Results to Clipboard | See Copying results. |
| 7 | Results | The matching lines under their objects. See Results and preview. |
| 8 | Preview | The selected match in its code. |
Wildcards

| # | Name | Description |
|---|---|---|
| 1 | Search box | The text to find, with * and ? as wildcards. |
| 2 | Wildcard help | Hover to read how the wildcards work, with an example. |
| Text | Matches |
|---|---|
* | Any run of characters, including none. |
? | Any single character. |
| Anything else | Itself, ignoring case. |
The text matches anywhere in a line, after leading and trailing spaces are removed from it. For example,
post*document finds both PostDocument and PostSalesDocument.
Results and preview

| # | Name | Description |
|---|---|---|
| 1 | Object type chips | One chip per object type in the results, with its number of lines. Select a chip to hide or show that type's objects. |
| 2 | Collapse all | Collapses every node. |
| 3 | Expand all | Expands every node. |
| 4 | Pinned rows | The object and the procedure or trigger of the top line stay pinned while you scroll. |
| 5 | Results | Object, then procedure or trigger, then the matching line. Select a row to preview it; a group row previews its first match. Press Enter or double-click to go to the line in the workspace window. |
| 6 | Preview title | The object and the procedure or trigger the match is in. |
| 7 | Preview | Eight lines above and below the match, numbered and colored, with the match line highlighted. Other matches in the same object are marked with a bar; hover one for Also a result. |
Status messages
| Status | Meaning |
|---|---|
| Searching… | The search runs; results appear as they are found. |
| N lines in M objects · 3.2 s | The search is done, with the time it took. |
| No code lines match | Nothing in the scope matches the text. |
| Cancelling… | You selected Cancel and the search is stopping. |
| Search cancelled | The search stopped before it found anything. |
| N lines in M objects · search cancelled | The search stopped; the lines found so far stay listed. |
Copying results
Copy Results to Clipboard copies every result, including those of object types a chip
hides, as tab-separated text with the columns Object, Context and
Code. Paste it into a spreadsheet.
Find a message written into code
Use this when a message is written straight into code, as in ERROR('Nothing to post.'), and
not in a text constant.
- Press Ctrl+Shift+F.
- Type the fixed words of the message, with
*where it shows values, such asnothing to post. - Press Enter and read the matches in the preview.
- Double-click the match to go to the line.
For a message held in a text constant, use Find the code behind an error message instead.
Find the code of a modification by its marker
Use this to list the code changed for a modification that is tagged in comments, such as //MOD01.
- Press Ctrl+Shift+F.
- Type the marker, such as
MOD01, and press Enter. - Select a chip to hide the object types you do not need.
- Select Copy Results to Clipboard to keep the list.
The Documentation trigger is searched too, so change log entries kept there are found as well.
Search the code of the open object
- Open the object in the object view.
- Press Ctrl+F. Code Lines opens with the scope This.
- Type the text and press Enter.
Behavior
- Window: opens centered on the workspace window at 85 % of its size, at least 1000 × 700, titled Code Lines after the product name.
- Order: results stream in while the search runs, objects ordered by type and number.
- Search box: disabled while a search runs; the focus returns to it afterwards.
- Background task: the search also shows among the workspace window's background tasks.