Reference manual

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

HowScope
Search › Code lines… (Ctrl+Shift+F)All
Search › Code lines (Current Object)… (Ctrl+F)This
Search code in Universal SearchAll
Search code for "…" in Universal Search, or Ctrl+Shift+F while Universal Search is openAll; searches at once for the text you typed

The Code Lines window

Prism for C/AL Code Lines window with results and a preview of the selected match
1 2 3 4 5 6 7 8
Code Lines with a match selected and previewed.
#NameDescription
1Search scopeThis: 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).
2Search boxThe text to find; see Wildcards. Press Enter to search.
3SearchStarts 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.
4StatusSee Status messages.
5Object type chipsHide or show the results of one object type. See Results and preview.
6Copy Results to ClipboardSee Copying results.
7ResultsThe matching lines under their objects. See Results and preview.
8PreviewThe selected match in its code.

Wildcards

Prism for C/AL Code Lines search bar with the wildcard help showing
The search bar with the wildcard help showing.
#NameDescription
1Search boxThe text to find, with * and ? as wildcards.
2Wildcard helpHover to read how the wildcards work, with an example.
TextMatches
*Any run of characters, including none.
?Any single character.
Anything elseItself, 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

Prism for C/AL Code Lines object type chips, results tree and preview of the selected match
1 2 3 4 5 6 7
The object type chips, the results and the preview of the selected match.
#NameDescription
1Object type chipsOne chip per object type in the results, with its number of lines. Select a chip to hide or show that type's objects.
2Collapse allCollapses every node.
3Expand allExpands every node.
4Pinned rowsThe object and the procedure or trigger of the top line stay pinned while you scroll.
5ResultsObject, 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.
6Preview titleThe object and the procedure or trigger the match is in.
7PreviewEight 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

StatusMeaning
Searching…The search runs; results appear as they are found.
N lines in M objects · 3.2 sThe search is done, with the time it took.
No code lines matchNothing in the scope matches the text.
Cancelling…You selected Cancel and the search is stopping.
Search cancelledThe search stopped before it found anything.
N lines in M objects · search cancelledThe 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.

  1. Press Ctrl+Shift+F.
  2. Type the fixed words of the message, with * where it shows values, such as nothing to post.
  3. Press Enter and read the matches in the preview.
  4. 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.

  1. Press Ctrl+Shift+F.
  2. Type the marker, such as MOD01, and press Enter.
  3. Select a chip to hide the object types you do not need.
  4. 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

  1. Open the object in the object view.
  2. Press Ctrl+F. Code Lines opens with the scope This.
  3. 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.