Reference manual

Objects page

Code fragment window

A code fragment window holds a copy of some code lines and where they came from. Use it to keep a piece of code in view while you navigate elsewhere, to write notes about it, or to share it with a colleague. Its title names the procedure or trigger the code comes from.

Opening it

In the Object view:

Each command opens a new window, so you can keep several fragments open.

Prism for AL code fragment window with the code of a procedure, notes and the copy button
1 2 3 4 5
A code fragment window with a note.
#NameDescription
1DeclarationThe procedure or trigger the code comes from. Select it to go to it. Before it, the object's id and name go to the object.
2Code linesThe copied lines, with the tooltips and links of the Object view.
3Line linkSelect it to go to the exact place of this line in the object.
4NotesYour notes about the code. See Share a piece of code.
5Copy source to clipboardCopies the fragment, with your notes, as plain text. See What the copy holds.

Share a piece of code

  1. Open the code in a code fragment window.
  2. Type your explanation in Notes.
  3. Select Copy source to clipboard.
  4. Paste into the email or ticket.

The reader gets the code, your notes and where to find the code.

What the copy holds

The copy holds, in this order:

  1. Source code fragment context: Path (the workspace), Object (type, id, name and module) and Declaration.
  2. Notes, when you wrote any.
  3. Source code fragment text: the code.

The window does not save the notes: they are gone when you close it.