Getting started
Press the Get trial license link in the Control panel:
The Trial license window now pops up:
Enter your details and press the Submit button. We will immediately email your trial license to the email address you have entered.
Open your email client, fetch new mails and open the email from us. You can now go ahead and install the trial license.
Copy the license key we emailed to you to the clipboard. Make sure to copy the whole key.
In Prism for AL's Control panel, press the Enter license which opens the License key window:
Paste in the license key and click Activate. You are now ready to open your first workspace.
Prism for AL features a number of ways to open a solution. You probably already have a Visual Studio Code AL project available, so to get started, here is what you do:
First, make sure you have used AL: Download symbols in Visual Studio Code. This is because Prism for AL needs access to the dependencies.
Then, if you have a .code-workspace
file, click the button
Open workspace in the Control panel and select the
.code-workspace
file.
Else, if you have Visual Studio Code AL project folder, click the button Open folder in the Control panel and select the folder.
Prism for AL will now load all objects including those defined in dependent packages. The first load of new package is always slower due to Prism filling its cache. You can speed up first time loads by excluding Prism for AL's cache folder from virus scanning, see Package cache.
You are now ready to browse code and analyze your code including Base Application and other dependencies. Check out the next section for your possible next steps.
Depending on your learning preferences, do any of the following or mix them to familiarize yourself with Prism for AL:
- Throw yourself into it – use tooltips to discover
- Read about Using Prism for AL.
- Watch a video.
- Read or scan the Reference manual.
If you get stuck or have any questions, simply email us at feedback@stati-cal.com.
Videos
Using Prism for AL
The workspace window dividers can be dragged for resizing and double-clicked to collapse/expand the object index and object outline section of the workspace:
The object outline can be opened in a separate window using the "File | Outline" menu.
To help you narrow objects shown in the object index, results in the usages windows etc, Prism for AL allows you to enter filter expressions.
All matching of search expressions against strings is case-insensitive. The following kinds of filter syntax is used:
Substring search: Matches any string that has the search string as substring.
Substring search with wildcards:
Allows ?
and *
as wildcards for
single character and zero or more characters.
Example: H?l*
is matched by Hello
.
Name and number: This is the most flexible search expression which can match against both text and id (numbers). This is used to match against entities that have a number in addition to a name, such as objects and table fields:
- You can search both entity name and number
- For names, you can use
*
and?
as a wild-cards - For names, use space to separate words; we implicitly add wildcards around each word
- For numbers, you can use
..
for ranges - You can use
|
as an or operator
18..20|..4|cust entr
is matched by
Codeunit 19 (because 19 is between 18 and 20), XmlPort 1
(because 1 less than 4)
and Page "Customer Ledger Entries" (because name includes 'cust' and 'entr'
in that order).
The control panel and the workspace window have sevaral shortcuts available for their menu items. These are printed following the menu item name.
Additional shortcuts are available for recent items in the control panel:
Shortcut | Description |
---|---|
Ctrl + 1 | Open recent workspace (1st from the top) |
Ctrl + 2 | Open recent workspace (2nd from the top) |
Ctrl + <n> | Open recent workspace (nth from the top) |
The following shortcuts are available for closing windows:
Window | Shortcut | Description |
---|---|---|
Workspace | Alt + F4 | Closes the focussed workspace window. Depending on the setting Confirm closing workspace you will be prompted to confirm. |
Control panel | Alt + F4 | Closes the control panel window including all workspace windows. If any workspaces are open, depending on the setting Confirm closing workspace you will be prompted to confirm. |
Any other window | ESC | If the setting Escape closes window is checked, then Escape closes the currently focussed window/dialog/pop-up. |
In many places such as the Usages window you can copy the result to clipboard using the copy to clipboard icon:
Tabular results are TAB separated, so you can paste directly into e.g. Excel.
Use expanders to collapse/expand individual items:
# | Description |
---|---|
1 | Expands or collapses individual items |
2 | Expands or collapses all items |
Reference manual
Term | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
App | An app is an add-on (extension) to Business Central in as defined by Microsoft. We also regard Base Application, SystemApplication, Application and System as well as localizations etc as apps. Synonyms: Module. | ||||||||||||||||
Code graph | Prism for AL is capable of exporting syntax, references and flow information into a graph database. We call this the code graph of a workspace. This enables a set of features such as Inbound Flow and Outbound Flow. A code graph may be either full or procedural (default). | ||||||||||||||||
Compilation unit |
A compilation unit is a unit of compilation, i.e. something we feed into our parsers.
Compilation units can be either .al files or an object within
SymbolReference.json inside an .app file.
Error handling in case of parse errors is at compilation unit level.
| ||||||||||||||||
Flow |
In Prism for AL, flow refers to reachability control flow, i.e. paths of code that might be traversed
through execution of AL code. Here are some characteristics of our implementation:
| ||||||||||||||||
Full graph | A full code graph contains nodes and edges for detailed syntax and detailed flow information and well as aggregated procedural flow. | ||||||||||||||||
Module | See App. | ||||||||||||||||
Module dependencies |
Modules can depend on other modules in a number of ways:
| ||||||||||||||||
Module dependency graph | Modules and their dependencies constitute a directed graph with modules as nodes and dependencies as edges. | ||||||||||||||||
Module metadata |
Data about a module found in
Visual Studio Code app.json files and NavxManifest.xml files in
packages.
| ||||||||||||||||
Package |
A .app file, which is the output of the AL compiler and
can be published to a Business Central server.
| ||||||||||||||||
Prism Path | A URI format for referencing declarations in an object. Prism Paths are specific to a workspace (because declarations are), but since there is a large degree of similarity between workspaces, e.g. those that use the same version of Base Application, Prism Paths can be used across separate workspaces.
Example: | ||||||||||||||||
Procedural flow |
Reachability flow at procedure/trigger level that aggregates flow information at procedure/trigger level.
Example: When there is a call to procedure Foo inside
procedure Foo , then Foo has a procedural flow to Bar .
| ||||||||||||||||
Procedural flow graph | A graph with procedural flow but without detailed syntax. Semantic information is aggregated at procedure/trigger level. | ||||||||||||||||
RIMD | Acronym for database operations:
| ||||||||||||||||
Symbol file |
The SymbolReference.json file found within
packages.
Prism for AL uses these files when source code is not available.
| ||||||||||||||||
Topological order | The topological order induced by the module dependency graph. When modules are sorted in topological order, dependencies are always pointing backwards thus giving a natural order in which to understand modules. The topologic order is used in e.g. the Object index for sorting and for applying changes from multiple extensions in the correct order for the Extended view. | ||||||||||||||||
Workspace | Workspace is quite an overloaded word which basically means space in which you work, so the meaning depends on your context, i.e. what you work with.
In Visual Studio Code, workspace is
a folder with an In Prism for AL, workspace is generalised to include any collection of modules you choose to view and analyse together as a solution (code-base) and does not distinguish much whether a module is a Visual Studio workspace or a package which your solution depends on. |
The following table gives an overview over which features are available per declaration kind. This influences whether the corresponding menu items are available in a declaration's context menu.
The matrix entries have the following meaning:
- Always: The feature is always enabled for the declaration kind.
- Full: The feature is enabled when a full code graph is loaded.
- Procedural: The feature is enabled when a code graph is loaded (full or procedural).
- (blank): The feature is not enabled for the declaration kind.
Declaration | Find Usages |
Find Inbound Flow |
Find Outbound Flow |
Show Inbound Procedural Flow-Graph |
Show Outbound Procedural Flow-Graph |
---|---|---|---|---|---|
Procedure | Always | Procedural | Procedural | Procedural | Procedural |
Variable | Always | Full | |||
Parameter | Always | Full | |||
ReturnVariable | Always | Full | |||
Field | Always | Full | |||
Key | Always | ||||
FieldControl | Always | ||||
PagePartControl | Always | ||||
ChartPartControl | Always | ||||
SystemPartControl | Always | ||||
LabelControl | Always | ||||
PageControlGroup | Always | ||||
UserControl | Always | ||||
ControlArea | Always | ||||
View | Always | ||||
PageAction | Always | ||||
ActionSeparator | Always | ||||
ActionGroup | Always | ||||
ActionRef | Always | ||||
CustomAction | Always | ||||
SystemAction | Always | ||||
FileUploadAction | Always | ||||
ActionArea | Always | ||||
Trigger | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeInsertEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterInsertEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeModifyEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterModifyEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeDeleteEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterDeleteEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeRenameEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterRenameEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeValidateDatabaseEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterValidateDatabaseEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnOpenPageEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnClosePageEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterGetCurrRecordEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterGetRecordEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnNewRecordEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnInsertRecordEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnModifyRecordEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnDeleteRecordEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnQueryClosePageEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeValidatePageEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterValidatePageEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnBeforeActionEvent | Always | Procedural | Procedural | Procedural | Procedural |
OnAfterActionEvent | Always | Procedural | Procedural | Procedural | Procedural |
Table | Always | ||||
Page | Always | ||||
Report | Always | ||||
Codeunit | Always | ||||
XmlPort | Always | ||||
Query | Always | ||||
ControlAddIn | Always | ||||
Enum | Always | ||||
PageCustomization | Always | ||||
Profile | Always | ||||
Interface | Always | ||||
PermissionSet | Always | ||||
TextConst | Always | Full | |||
QueryColumn | Always | ||||
QueryFilter | Always | ||||
QueryDataItem | Always | ||||
ReportColumn | Always | ||||
ReportDataItem | Always | ||||
EnumValue | Always | Full | |||
DotNetType | Always |
Control windows
# | Name | Description |
---|---|---|
1 | Open .code-workspace file |
Opens a workspace based on
Visual Studio Code Once the file has been selected, the Loading window opens. |
2 | Open folder |
The simplest usage of Open folder is to open a
Visual Studio Code project folder, i.e. a
file system folder containing an Prism for AL can also open a folder that has sub folders (recursively) that are Visual Studio Code projects such as this: ├───app-A │ │ app.json │ │ DoThis.Codeunit.al │ │ │ └───.alpackages └───app-B │ app.json │ DoThat.Codeunit.al │ └───.alpackagesThis works similar to opening a workspace file.
Another option is to open a folder which contains packages ( Once the file has been selected, the Loading window opens. |
3 | Open package | Opens a package file (*.app). This will create an in-memory artificial module with a dependency to the single package. Package dependencies are not included; to achieve that, use Open folder instead. Once the file has been selected, the Loading window opens. |
4 | Full graph | Determines whether a full graph or a more compact procedural flow graph is loaded. |
5 | Auto-build graph | Determines whether a code graph is automatically generated when a workspace has been opened. |
6 | Memory cache |
When this settings is enabled (default), then
Prism for AL will snapshot the source files found in workspace folders
(but not source code found in This insulates the viewing experience from file changes by an external editor like Visual Studio Code. However, it also increases memory usage. You can monitor usage in the workspace window. Notice that this setting affects opening of new workspaces as well as opening of recent items. The setting does not survive restart of Prism. |
7 | Package resolution options | The following settings control how packages are resolved during loading:
Notice that these settings affect opening of new workspaces as well as opening of recent items. The settings do not survive restart of Prism. |
6 | Recent | This is a lists of workspaces you have opened recently sorted in reverse chronological order. Click a recent workspace or use shortcuts Ctrl + 1, Ctrl + 2 etc (counting from the top) to open open the workspace. If the workspace is already open, focus shifts to the workspace window. Recent items offer a context menu, see below. |
8 | License | The license part shows the current license (if any is installed) and it's status. The tooltip on the status gives additional information, e.g. expiration date when the license is valid. Without a license, Prism for AL is feature-limited. Subscribe or get a trial license to enable all features. Click the Enter license button to open the License window. |
9 | Features summary | The features part shows a summary of your usages of main Prism for AL features. Use the features button in the control panel to learn about each feature. Click the release notes link to open your default browser with on the release notes page for Prism for AL. |
10 | Settings | Opens the Settings window. |
11 | Package cache | Opens the Package cache window. |
12 | Feedback | Opens the Feedback window. |
13 | Features button | Opens the features window where you can explore unused features. |
14 | Release notes | Opens your default browser with on the release notes page for Prism for AL. |
15 | Status | Watch this for status messages like availability of new releases of Prism for AL. Click the status to open your default browser on the download page for Prism for AL. |
16 | Recent | Overview of recently opened solutions. Click an item to open or use the context menu for managing recent items. |
Search depth values (dotted lines in the pictographs are propagated dependencies):
Mnemonic | Description | Pictograph |
---|---|---|
W | Workspace: Workspace modules ( app.json ), only. No packages are included.
|
|
W→P | Workspace and direct dependencies: Workspace modules ( app.json ) as well as direct package dependencies (*.app)
|
|
W→PP | Workspace and direct/propagated dependencies: Workspace modules ( app.json ) as well as direct package dependencies (*.app) and their propagated dependencies.
|
|
W→P→* | Workspace and transitive dependencies: Workspace modules (app.json) and all dependencies transitively (recursively)." Notice that this setting may lead to unexpected results as old, now unused packages in Visual Studio Code .alpackages folders may be included.
|
File menu:
Menu item | Description |
---|---|
Open | Opens a workspace. The submenus correspond to the open buttons. |
Recent | The submenu contains a list of recently opened workspaces (like the recent section). Click to open. |
Package Cache | Opens the Package cache window. |
Settings | Opens the Settings window. |
Close Open Workspaces | Closes all open workspaces. If the setting Confirm closing workspace is checked, then a confirmation dialog pops up. |
Exit | Exits Prism for AL. |
Help menu:
Menu item | Description |
---|---|
Features | Opens the features window where you can learn about main features and track your usage. |
Learn | Opens your default browser on the learning page you are currently reading. |
Feedback | Open the Feedback window. |
Log |
Prism logs diagnostic messages to rotating log files as well
as to in-memory session log for the current session (run of Prism). Notice that the log level setting
does not survive restart of Prism.
The submenus are:
|
Troubleshoot | If you have trouble opening a workspace, e.g. some modules are unresolved, we may ask you to use this menu to
record your workspace. Basically, this builds a copy of your workspace but without the The submenus are:
|
Optimize Prism Package Cache Performance | Copies to clipboard a PowerShell script to exclude Prism's cache directory for Windows Defender. See also Package cache. |
Enter License | Open the License dialog. |
Get Trial License | Open the Trial license window. |
End-User License Agreement (EULA) | Places the End-User License Agreement (EULA) PDF document on your desktop and reveals in Windows Explorer. |
Third-Party Licenses | Places Excel sheet an overview of 3rd party license components used by Prism for AL. The file is revealed in Windows Explorer. |
OpenJDK |
|
About | Displays information about Prism for AL. Please make sure to download a newer version of Prism for AL before the executable expires date. |
Recent context menu:
Menu item | Description |
---|---|
Open Workspace | Loads the workspace if not already opened with the current package resolution options (not those at the time of the last opening of this workspace). |
Reveal in File Explorer | Opens Windows File Explorer highlighting the folder or file corresponding to the workspace. |
Remove Recent Item | Removes the workspace from the recent list. |
Remove All Recent Items | Empties the recent list. |
The Loading window is opened when opening a workspace. The main activities are:
- Locate workspace
app.json
file(s) - Locate available package files (typically in
.alpackages
, but depends on setup in Visual Studio Code) - Parse
app.json
- Parse
NavxManifest.xml
files from packages -
Resolve dependencies from
app.json
andNavxManifest.xml
taking into account the dependency declaration's version. Package resolution is influenced by package resolution options. -
Parse
.al
files from workspace folders and packages where source code is available - Parse
SymbolReference.xml
for packages where source code is not available - Index object members and object level dependencies
# | Name | Description |
---|---|---|
1 | Current activities | The current load activity or activities. |
2 | Overall progress | The overall progress bar is indefinite until all packages have been cached. |
3 | Workspace |
Folder, .code-workspace or .app file being loaded.
|
4 | Timer | Time spent loading. |
5 | Cancel | Click to cancel the loading process. |
# | Name | Description |
---|---|---|
1 | Full path to code.cmd |
Full path to Visual Studio Code's code.cmd file.
Normally, you can leave this blank as the containing folder is in
Window's PATH environment variable.
|
2 | Default search depth | This is the default value of . |
3 | Remember code line selections | Check to make Prism for AL remember selected code lines of an object when navigating to other objects. Notice that when you restart Prism for AL or reload a workspace, code lines selections are lost. |
4 | Expanded filter panel | Check to always expand the filter panel of the Usages window. |
5 | Show filter button presence effect | Check to show effect on filter button when a filter is available in the Usages window. |
6 | Expanded result groups | Check to expand usages groups when the Usages window is opened. |
7 | Show filter ratio bar | Check to show bar at bottom of Usages window that indicates the ratio of the search results that are currently displayed. |
8 | Window width | Adjust the initial width of the Usages window when opened. |
9 | Window height | Adjust the initial height of the Usages window when opened. |
10 | Result limit | The maximum number of flow nodes fetched for display in the Flows window. This is a safeguard mechanism, and the default value of 2,000,000 should be sufficient for normal size workspaces. |
11, 12, 13 | Manual refresh of result set | When enabled and the conditions apply, then auto-refresh is disables in the Flows window. |
14 | Minimum heap size | Minimum heap size of the graph server process. |
15 | Maximum heap size | Maximum heap size of the graph server process. If a graph server process reports out of memory exceptions, then consider to increase this value. |
16 | Hardware-accelerated graphics | If checked (default), UI rendering allows hardware acceleration. Uncheck to disallow hardware acceleration. Unchecking this may solve rare conditions caused by erroneous graphics drivers. |
17 | UI virtualization in usages windows | For large result sets, expanders sometimes forget their open/close state. Chech this settting to prevent this from happening. |
18 | Show startup animation | Check to show animation when Prism for AL starts. |
19 | Confirm closing workspace | If checked, asks before closing a workspace |
20 | Escape closes window | If checked, ESC closes windows apart from control panel and workspace window. |
21 | Selected item cursor blink count | Sets the number of times Prism for AL's declaration cursor blinks next to the selected code line when navigating. |
22 | Selected item cursor scale factor | Sets the scale factor for Prism for AL's declaration cursor next to the code line navigated to. The default value is 1.00, so 2.00 doubles the size. |
23 | Show toolbar button labels | Determines whether toolbar buttons contain descriptive texts. A few toolbar buttons do deliberately never have button labels. |
24 | Save | Saves changes. Saved settings are persistent, so will survive restart of Prism for AL. |
25 | Undo | Resets values back to just after last Save. |
File menu:
Menu item | Description |
---|---|
Save | Saves changes. Saved settings are persistent, so will survive restart of Prism for AL. |
Undo | Resets values back to just after last Save. |
The primary purpose of the package cache is to optimize load performance.
A secondary purpose is to allow package resolution to include packages not found in
the workspace, see Search depth.
Basically, the cache consists of artifacts extracted from
.app
files. The location of the cache is
%LOCALAPPDATA%\Statical\PrismAL\PackageCache
.
Prism for AL writes to the cache during loading when encountering a new package or a new version of a known package. Anti-virus programs can slow down this process significantly, so – if your security policy allows – you may consider excluding the cache folder from being scanned. If you are using Windows Defender, you can use PowerShell to exclude Prism for AL's cache directory. See below how to obtain a PowerShell script for Windows Defender. For other anti-virus programs, please check the documentation.
# | Name | Description |
---|---|---|
1 | Copy script to clipboard | Copy PowerShell script for excluding Prism for AL's package cache from Windows Defender to clipboard. |
2 | Publisher | The module's publisher. Click to sort. |
3 | Name | The module name. Click to sort. |
4 | Version | The module's version. Click to sort. |
5 | Size | The size on disk of this cache entry. Click to sort. |
6 | Wipe selected package | Select a package by clicking a row. Then click Wipe selected package to remove the package from the cache. |
7 | Wipe all packages | Click to empty the cache. This will save disk space, but will slow down first-time loading of workspaces. |
8 | Ok | Closes the window. |
When no license is installed, the control panel's license part has a link that opens the trial license page. Submit your details to receive a trial license by email. If you have recently received a trial license from us, we may reject the request. Of course, you can always contact us a ask politely for another trial if you are not yet convinced of subscribing.
# | Name | Description |
---|---|---|
1 | Name | Enter your name. |
2 | Enter your email address. Use your company email address. | |
3 | Company name | Enter the name of the company you work for. |
4 | Phone | Enter your phone number, if you want ús to be able to call you. |
5 | Tell us | Tells us how you heard about Prism for AL. This helps us understand how to reach potential customers. |
6 | We respect your privacy | Opens your default browser with our privacy policy. |
7 | Submit | Click to submit. |
8 | Cancel | Click to cancel the request and close the window. |
The license key window is accessed from the control panel. When you have received a license key for your subscription or a trial license key, enter it in the License key window:
# | Name | Description |
---|---|---|
1 | License key | Paste in the license key here. Be careful to copy the whole key, as license keys may include characters which some editors regard as separators when selecting text. |
2 | Activate | Click to activate key. If the key is not valid, please ensure that you have pasted in the whole key. Also check the tooltip of the license status. in the control panel. |
3 | Cancel | Leaves the current license key in place, if there is one, and closes the window. |
The Feedback window is available from menus in both the Control panel and the Workspace window.
Use the window to give us feedback such as:
- Ideas for new features
- Ideas for changes to current features
- Bug report
- Your favourite feature
- Example of hard problem you solved with Prism
- …
# | Name | Description |
---|---|---|
1 | Feedback | Enter a description of the idea, bug etc. |
2 | Email address | Enter your email address. This is optional, but without the email address we do not know who you are, so we cannot get back to you with clarifying questions or simply a status. |
3 | Attachment | Use the file selector to select a single file you want to attach. |
4 | Attach log file | Check this to attache the tail of the current log file. THis helps us diagnose the problem. |
5 | Attach clipboard image | Check this is you have taken a screenshot and copied it to clipboard or intent to do so before submitting the feedback. |
6 | Send/Cancel buttons | Click Send to send the feedback to us optionally including a file attachment, the tail of the log file, and an image from the clipboard. Click Cancel to close the feedback window. |
Workspace windows
The workspace window is Prism's main window once a workspace has been opened:
# | Name | Description |
---|---|---|
1 | Current object | The object that is currently selected. Right-click to open the object context-menu. |
2 | View selector |
Select how you want to see objects
|
3 | Object index (part) | Index of the all objects in the workspace including dependencies, see Object index. |
4 | Object details (part) | This part shows details of the current object depending on View selector. The default view is Extended view. |
5 | Object outline (part) | This part outlines the contents of the current object, see Object outline. The outline is hidden when current view selection is . |
6 | Back and forth navigation arrows |
Use the back for forth navigation arrows to navigate your browsing history.
You can also navigate history with the following shortcuts:
|
7 | Reload button |
Reloads the current workspace. Use this button when workspace files
(typically .al or app.json ) are changed on disk, for example
when you have edited the files in Visual Studio Code. See also
Memory cache |
8 | Build graph button | Builds a code graph for the currently open workspace. |
9 | Compilation unit parse errors | This button is enabled and red if any parse errors where encountered during workspace loading. Click to view compilation unit errors |
10 | Graph build errors | This button is enabled and red if errors occurred when generating a code graph for the current workspace. Click to view graph generation errors |
11 | Control panel button | Focuses the Control panel window. |
12 | Settings button | Opens the Settings window. |
13 | Solution | Opens the Solution window. |
14 | Module graph | Opens the Module graph. |
15 | Outline button | Opens the Object outline in a separate window, which sticks to the object that was current/selected when opened. |
16 | Object namespace display |
This dropdown determines if and how namespaces are displayed for object references:
|
17 | Current package | Displays the name of the current object's module. Click to open reveal in the Module graph. If the module has symbols only (source code not available), then the module name us postfixed with an asterisk (*). |
18 | Workspace path |
Left-click the path to open or reveal .code-workspace file in
Window File Explorer, depending on how the workspace was opened.
|
19 | Resolution depth | Shows the resolution depth this solution was opened with. |
20 | Source cache memory consumption |
Shows the amount of memory consumed by caching of source files in the workspace
folder(s).
This is only displayed when the workspace folder(s) contains .al files and
memory cache
was enabled when opening the current workspace.
|
21 | Language selector | Select the language in which you want to see label translations. You can set a default value in the Settings window. |
File menu:
Menu item | Description |
---|---|
Control Panel | Shows and focuses the control panel. |
Explore | Opens the workspace file explorer window for the current workspace. |
Close | Closes the workspace and updates the control panel's Recent items, so it is easy to open the same workspace later. You can also close a workspace by closing the window. |
View menu:
Menu item | Description |
---|---|
Go to Position |
Opens a dialogue where you can enter a character position relative to the
current object's start position within the .al file.
Click "OK" to navigate to the position in
Source view.
|
Go to Prism Path | Opens a dialogue where you can enter or paste in a prism path. Click "OK" to navigate to the declaration in the current workspace. |
Extended Object | Swiches to Extended view of the current object. |
Object | Swiches to Object view of the current object. |
Source | Swiches to Source view of the current object. |
Dependencies | Swiches to Dependency view of the current object. |
Open Dependencies in New Window | Opens the Dependency view of the current object in a separate window. |
Module Graph | Opens the Module graph. |
Outline | Opens the Object outline in a separate window which sticks to the object that was current/selected when opened. |
Search menu:
Menu item | Description |
---|---|
Fields | Opens the Search fields window. |
Procedures | Opens the Search procedures window. |
Event Publishers | Opens the Search event publishers window. |
Free Text Search (Current Object) | Opens the Free text search window pre-configured for the current object. |
Free Text Search (All Objects) | Opens the Free text search window pre-configured for searching all objects. |
The history menu lists all objects and places within objects which you have navigated to or from since the workspace was opened. The history is in reverse chronological order and marks the last visited entry with green colour.
Click any history item to re-navigate. Re-navigation does not affect the history other than green marking. You can also navigate history with the back and forth arrows.
Menu item | Description |
---|---|
Save Object Dependencies |
Object dependencies are useful to monitor in order to manage dependencies.
This function produces a cross-reference of
object references within the workspace as a .csv (tab separated) file.
|
Save Unreferenced Objects |
Unreferenced object are potentially 'dead' code that should be cleaned up.
This function produces a list of objects that are not referenced by any other objects.
Such objects may still be used, though, e.g. object extensions (which cannot be
referenced at all at object level) and event subscribers which are also not referenced (instead,
references are the other way (from the subscriber to the publisher.) To use:
|
Save OnPrem Procedure Usages |
It is good practice to keep the number of dependencies to OnPrem annotated code
as low as possible. To enable this report, please make sure to
build a code graph.
This function produces a list of usages of OnPrem functions and objects.
To use:
|
Help menu:
Menu item | Description |
---|---|
Learn | Opens your default browser on the learning page you are currently reading. |
Feedback | Open the Feedback window. |
Log |
Prism logs diagnostic messages to rotating log files as well
as to in-memory session log for the current session (run of Prism). Notice that the log level setting
does not survive restart of Prism.
The submenus are:
|
Version Check | Runs an up-to-date check to see if the installed version of Prism for AL is the newest version available. If not, you should update to the latest version. |
Enter License | Open the License dialog. |
About | Displays information about Prism for AL. Please make sure to download a newer version of Prism for AL before the executable expires date. |
Namespace name formatting options:
This combobox controls how object references are formatted.
Value | Description | ||||||
---|---|---|---|---|---|---|---|
Source | Only show namespace names before object references, if they are written in the source code.
| ||||||
Qualified | Always show namespace names before object references, regardless of how the object references are written in the source code.
| ||||||
Unqualified | Never show namespace names before object references, regardless of how the object references are written in the source code.
|
The solution window opens once Prism has loaded a workspace. It consists of two or three tabs:
- General: Module overview
- Discovery: Package resolution overview
- Code Graph: Graph generation status, graph server management, and metrics of the code graph. This tab is only visible with a code graph is being generated or has been generated.
Once you select an object, the solution window closes. Use the Solution button to open the solution page again.
The General tab contains a table of modules that Prism has tried to resolve:
If you see any parse errors on this page, please refer to the parse error troubleshooting section.
All data originates
from app.json
files for workspace folders and NavxManifest.xml
files for packaged modules (.app
files). Below we will refer to this data as
module metadata. From the detail view we describe only
special fields not directly copied from module metadata.
# | Name | Description |
---|---|---|
1 | Search | Substring search in columns: Publisher, Name and Version. |
2 | Topologic order (#) | The topologic sort order deduced from the module dependencies. |
3 | Publisher | The publisher name from the manifest. |
4 | Name | The name of the module. |
5 | Version | The version the module. |
6 | Constraint | The aggregated version constraint by other modules of the workspace. |
7 | Origin | Indicates whether the module is from a workspace folder or from a package. |
8 | Total object count | Total number of objects found in the module. |
9 | Object count per object type | Number of objects per type. |
10 | Export solution metrics | Exports solution metrics to Excel. These metrics can be useful when estimating the 'size' of a customer solution. |
11 | Dependency graph | Opens the Module graph window highlighting the module. |
12 | Path |
The path app.json or NavxManifest.xml where the
module is defined. Click to open in your default text editor.
|
13 | Resource Exposure Policy |
Tri-state checkbox with following semantics:
|
14 | Discovery | This tab lists resolution candidates for this module and indicates which module was resolved. |
15 | Using | This tab lists modules which this module depends on and the version constraint. Click a module to view its details. |
16 | Used By | This tab lists modules (including actual version) which uses this module. Click a module to view its details. |
17 | Translated By | This tab lists translation (XLIFF) files that translate texts in this module. |
The Discovery tab contains a table of package files that Prism for AL has considered while loading:
# | Name | Description |
---|---|---|
1 | Status |
One of the following:
|
2 | Path |
The (virtual) path to modules here represented as app.json files and .app files.
|
3 | app.json file |
This row represents the root of a Visual Studio Code project, here in the root directory. Click the row to view module details. |
4 | .app file included |
This row represents a package successfully included in the workspace. Click the row to view module details. |
5 | .app file ignored |
This row represents a package file that has been ignore. Typically because there are not dependencies to it or dependencies are ignored due to the Package resolution search depth. Click the row to view module details. |
While generating a code graph, the Code Graph tab contains the generation status and metrics:
# | Name | Description |
---|---|---|
1 | Status | Information about current phase and overall progress. |
2 | Metrics | Various metrics of the generated code graph. The metrics are recorded by the export step, not the actual graph database. |
Once the graph has been generated, the status section is replaced by Management:
# | Name | Description |
---|---|---|
1 | Stop | Stops the graph server service. This will disable all features that depends on the code graph. This is intended for emergency situations, only. |
2 | Restart | Restarts the graph server service with the same graph database. This is intended for emergency situations, only. |
app.json
/
NavxManifest.xml
metadata files.
Depending on settings, the graph includes all kinds of
module dependencies:
# | Name | Description |
---|---|---|
1 | Graph | Modules are nodes and dependencies are edges in the graph. Click a module to high-light the module and it's outgoing dependencies and its module details on the right. Use FN and MOUSE WHEEL to zoom in and out. |
2 | Module details | Module details from the metadata file. |
3 | Layout algorithm | The algorithm used to layout the graph. Experiment with the options to find the one that fit's your purpose best. |
4 | Direction | The direction of the layout. |
5 | In-degree/out-degree | Check this to annotate modules with the total number of in- and out-going dependencies. |
6 | Location | Check this to annotate modules with location of the module in the file system. |
7 | Version constraint | Check this to annotate dependencies with the version constraint specified. |
8 | Unused | Check this to only show modules that are referenced by another module. |
9 | Unresolved | Check this to include unresolved dependencies. |
10 | Propagated | Check this to include propagated dependencies. In the example above, the dependency from VAT Group Management to Base Application is propagated via Application. |
11 | System |
Check this to include System module and all dependencies to it.
(Basically all modules except those without platform element.)
|
Use the object index to get an overview of objects and search for specific objects:
Objects are presented in a (configurable) hierarchy with the objects as leaves:
# | Name | Description |
---|---|---|
1 | Grouping level 1 | The first grouping level is by default the module. Modules are presented with name followed by publisher. |
2 | Grouping level 2 | The first grouping level is by default the object type. |
3 | Object | The third level of the hierarchy is object. Objects are presented with an icon representing the object type, the object name followed by the object number. |
4 | Search | Enter a filter expression to search for specific objects. The list is changed as you type. Object filter expressions can filter on both object name and object number. |
5 | Settings | Opens the index settings dialogue. |
6 | Expand/collapse all | Toggle button for expanding/collapsing all groupings. |
Module context menu:
Menu item | Description |
---|---|
Go to Module | Opens the Solution and opens the module's detail view. |
Menu item | Description |
---|---|
Find Usages | Find usages of the object. |
Find Built-in Function Usages | Opens the Find built-in function usages window where you can select which built-in functions to include in the search. |
Show TransferFields Mapping From |
Enabled for tables, only.
Pops up a dialogue where you can select a source table (for TransferFields ) which is then used to
open the Transfer fields window
showing the field mapping from the source table to this table.
Don't worry too much about source and target, as this can be changed on the fly in the mapping window.
|
Explore Table Relations | Enabled for tables, only. Opens the Explore table relations window with the current table as starting point. |
Go to Object Definition in Visual Studio Code |
Enabled for objects defined in a workspace file, only (not objects defined in an included package.).
Opens Visual Studio Code folder or .code-workspace depending on how Prism for was
opened, and navigates to the object. If the folder or workspace is already open in Visual Studio,
then the instance is reused.
Notice that you can also navigate to a precise object location in Visual Studio Code from
anywhere in the
Object view.
|
Open in Text Editor |
Opens your default tool for .txt in a temporary file with the source code of the object.
|
Copy to Clipboard | Copies the source code of the object to the clipboard. |
Go to Module | Opens the Solution and opens the detail view of the object's module. |
Clear Codeline Selections | Clears the current set of codeline selections. |
Use the settings dialog to control grouping and sorting:
Change settings as described below, then click somewhere else for the changes to take effect. Notice that these settings are per open workspace and they are not persistent (they are reset back to default next time you open Prism for AL.)
# | Name | Description |
---|---|---|
1 | Hierarchy order | Click the up/down arrows to dedice if module or type is the top grouping. |
2 | Enable/disable a level | Use checkboxes to group by module, object type or both or even none. |
3 | Direction | Check to sort this level ascending, uncheck to sort descending. |
4 | Sort By |
Modules may be sorted by one of:
|
This view is shown when it has been selected via the View selector. The object view presents the full details of the object as a logical structure using icons, colours, module annotations etc:
# | Name | Description |
---|---|---|
1 | Declaration section shortcuts | Links to sections of object content post-fixed with the number of declarations. Click the link to navigate to the first declaration of the kind. A link is only displayed when there are declarations of that kind. Trigger Events are only displayed when there are subscribers. |
2 | Object extensions | List of objects extending this object. Click to navigate to the object. |
3 | Module annotation | Object references have postfixed information about the module the object belongs to (publisher name and module name). |
4 | Semantic code colouring |
Identifiers in code are coloured based on their semantics. For example, built-in instance methods
like PAGE.Update are coloured green in the code.
|
When a code graph has been generated for the workspace, immediate insights are available above procedures and triggers:
# | Name | Description |
---|---|---|
1 | Procedural flow graph | Opens the Procedural flow graph window starting from the procedure/trigger. |
2 | Commit |
Indicates if explicit commit calls are reachable on a path with no
CommitBehavior set. Use the context menu to find the actual
commit invocation sites.
|
3 | RIMD |
Show how table are used when the procedure or trigger runs.
The information here is aggregated across all tables.
To drill down to table level, use the context menu.
The symbols in brackets indicate the RunTrigger :
|
Immediate insights context menu:
Menu item | Description |
---|---|
Procedural Flow Graph | Opens the Procedural flow graph window for the procedure or trigger. |
Reachable Committing Procedures and Triggers | Opens the Flows window and shows commit call sites reachable from the procedure or trigger. |
RIMD overview | Opens the RIMD overview window that shows the per table 'RIMD signature' of the procedure or trigger. |
Events are highlighted with icons:
# | Name | Description |
---|---|---|
1 | Yellow lightning symbol | Event publisher. |
2 | Green lightning symbol | Event subscriber. |
3 | Subscriber's publisher reference | Click the subscriber identifier to navigate to the publisher. |
When
TransferFields
is used on two different tables,
a special context menu is available:
Menu item | Description |
---|---|
Show Inter-table Field Mappings | Opens the Transfer fields window. |
Identifiers that reference a declaration have tooltips and you can click to navigate to the declaration:
Following navigation, a little red dot will high-light the navigation target. Also, the navigation history is updated, so hitting the back button after navigation will bring you back to the navigation source.
When clicking an identifier that resolves to a built-in function, a window with Microsoft's official documentation is opened in your default browser.
Identifiers that declare something, e.g. variables, procedures, fields etc, offer Find usages via left-click:
Menu item | Description |
---|---|
Find Usages | Find usages searches the whole workspace including packages for usages of the declaration and opens the Usages window. |
Find Inbound Flow | Finds flows to the declaration and opens the Flows window. This menu item is only enabled when a code graph has been generated, see build graph. |
Find Outbound Flow | Finds flows from the declaration and opens the Flows window. This menu item is only enabled when a code graph has been generated, see build graph. |
Show Inbound Procedural Flow-Graph | Visualizes the inbound procedural flow to a declaration. Opens the Procedural Flow-Graph window and displays flows into the declaration. This menu item is only enabled when a code graph has been generated, see build graph. |
Show Outbound Procedural Flow-Graph | Visualizes the outbound procedural flow from a declaration. Opens the Procedural Flow-Graph window and displays flows from the declaration. This menu item is only enabled when a code graph has been generated, see build graph. |
Copy Prism Path to Clipboard | Copies the prism path to the clipboard. Paste the path into your own notes or share with a colleague. In an open workspace you can navigate to the path with Ctrl-Shift-G which opens the Go to path window. |
Go to Source | Changes view to Source view and positions cursor at the declaration. |
See Declaration search feature matrix for information about which search features are available for which declarations and when.
Procedures (including event publishers and subscribers) offer additional functionality via the context menu:
The additions are:
Menu item | Description |
---|---|
Copy Name to Clipboard | Copies the name of the procedure, to the clipboard. |
Copy to Clipboard | Copies the source code of the procedure to the clipboard including annotations. |
Open in Text Editor | Opens your default text editor with the source code of the procedure. |
A context menu is available anywhere in the object view, properties, code lines etc:
Menu item | Description |
---|---|
Go to Source | Changes view to Source view and positions cursor on the same line. |
Go to Line in Visual Studio Code |
This menu item is available for objects defined in .al
files in workspace folders, i.e. not in packages.
Opens Visual Studio Code (if not already open with the current folder/workspace
and navigates to the line where the function was invoked.
|
Code sections of procedures and triggers offer the following context menu:
Menu item | Description |
---|---|
Copy Code to New Window | Copies all code to a new Code fragment window. |
Copy Code to Clipboard | Copies all code to the clipboard. |
Go to Source | Changes view to Source view and positions cursor at the procedure or trigger. |
Code lines of procedures and triggers can be selected and be actioned in various ways Left-click the area to the right of the vertical bar on the start and end line. The area will be marked with symbol, and the start and end indicators offer a context menu:
Menu item | Description |
---|---|
Copy Code to New Window | Opens the Code fragment window with the selected lines. |
Copy Code to Clipboard | Copies the selected code lines to the clipboard with context information. |
Copy Code to Clipboard without Context | Copies the selected code lines to the clipboard without context information. |
Open Code with Default Text Editor | Opens your default text editor with the code lines. |
Clear Selection | Clear the selection of code lines. You can also clear the start or end selection with a left-click. |
Based on data in XLIFF files, Prism shows translations in place in the selected language. Hover over the translation symbol to see how there the translation originates. In case multiple translations are available for the same language, all translations are displayed in priority order with a 'disqualification' reason.
This view is shown when it has been selected via the View selector and is also the default view. The extended view is similar to the Object view but inlines items defined in the object's extensions:
# | Name | Description |
---|---|---|
1 | Control change action |
Here Add Controls Before corresponds to addbefore , meaning add
controls before the anchor.
|
2 | Anchor reference | The base control to anchor the action, i.e. the control to add controls before. Click to navigate to the control in the base page. |
3 | Controls to add | The controls to add before the anchor. |
4 | Inlined extension control | The field added by the extension is displayed in the base page and before the anchor. |
5 | Anchor declaration | The anchor control declared in the base page. |
6 | Extension arrow | The arrow indicates that this control is defined in an extension. Click the arrow to navigate to the declaration in the extension object. |
Notice that if multiple extensions try to e.g. add controls before a certain control, the outcome depends on the order in which the extension actions are applied. Prism applies changes in the topological order induced by the module dependencies, just like Business Central's runtime.
The source view is shown when it has been selected via the View selector. You can also get to the source view by other means:
- Go to position menu in the Workspace window.
- Go to source menus from Object view and Extended view.
The dependencies view gives an overview of how other objects use the current object and how the current object uses other objects. The view is selected with the View selector and has sections for Used by (incoming references) and Using (outgoing references)
Hold the Shift key and select one or more columns to sort. Multiple click on the same column reverses the order.
# | Name | Description |
---|---|---|
1 | Search field | Enter a name and id search expression to narrow down the results. The filtering works against both object name and object number. |
2 | Used By | Overview of how the current object is used by other objects. The title is postfixed with total count and optionally number of results filtered out. |
3 | Using | Overview of how the current object uses other objects. The title is postfixed with total count and optionally number of results filtered out. |
4 | Module (grouping) | Results are grouped by module. |
5 | Type | The object type. |
6 | Id | The object Id. |
7 | Name | The object name. |
8 | Dependency types | The type of object dependency. |
9 | Checkmark | A checkmark indicates that the object, here Codeunit "Price Helper - V16" has at least one dependency to current object (Table Customer) of type OnAfterRename (database trigger event). |
10 | Used by object name functionality | Click the object name to navigate. The full object context menu is available. Notice however, that Find usages works like a drill-down: Selecting Find usages on Codeunit "Price Helper - V16" will return all object dependencies to the current object (Table Customer) from Codeunit "Price Helper - V16". |
11 | Using object name functionality | Click the object name to navigate. The full object context menu is available. Notice however, that Find usages works like a drill-down: Selecting Find usages on Enum "Price Calculation Method" will return all object dependencies from the current object (Table Customer) to Enum "Price Calculation Method. |
The object outline is a tree structured index of the object contents and is both part of the workspace window and can also be opened in a separate window in several ways. This allows you to have outline windows open for multiple objects.
As part of the workspace window, the outline follows the current object when the windows was opened. When opened as a separate window, the window sticks to the object that was current/selected when opened.
# | Name | Description |
---|---|---|
1 | Search field | Enter a name and number search expression to find what you are looking for. Outline items can be filtered by name and/or number (when the item type allows, e.g. field numbers may be searched.) When an item is inside the filter, but a parent is not, the parent is greyed out. |
2 | Expand/collapse arrows | Expand/collapse arrows appear when the cursor is in the left of the tree. Click to expand/collapse |
3 | Settings | Opens the settings dialogue, see below. |
The outline settings provides detailed configuration options:
Here follows a description of the non-obvious settings:
# | Name | Description |
---|---|---|
1 | Kinds | Check to preceede each item with its kind, e.g. FIELD. |
2 | Types | Check to show AL types for variables and parameters |
3 | Groups | Check to add a grouping entry. E.g. triggers will be grouped under an entry TRIGGERS. |
4 | Extensions | This setting is enabled in Extended view and for extensible objects, only. Check this setting to only show items that are inlined from extensions. See screenshot below. |
When outline settings have checked Extensions, then only items inlined from extensions are displayed:
Click an item in the outline to navigate to the declaration in the current workspace view.
Right-click to activate the same context menu that is available in Object view and Extended view,
Overloaded procedures are marked with a counter and navigation arrows that indicate if more overloads exist either prior to or following a procedure:
The code fragment window can be open from code sections or by selecing code lines. Use the fragment window to remember interesting code fragment for your own purpose or for sharing with a colleague.
# | Name | Description |
---|---|---|
1 | Origin | Name of original procedure or trigger where the code lines were copied from. Click to navigate to the procedure or trigger. |
2 | Code | Code with usual Object view features such as tooltips and go to definition links. |
3 | Origin source line link | Link back to original line of code where this was copied from. |
4 | Notes | Add notes to this code fragment. |
5 | Copy to clipboard | Copy context, code and notes to the clipboard as plain text. |
This dialog is invoked from the object context menu
Find Built-in Function Usages.
The dialog allows you find where certain instance methods
are called on the target object. You can think of usages
being on the form TargetObject.BuiltInFunction
,
although the process of course also finds usages where
the object is implicit as it is in with
statements and
when used without preceeding rec.
via e.g. the
SourceTable
property.
Select which instance methods to search for (multiple selections are allowed):
# | Name | Description |
---|---|---|
1 | Target object | The object to search for calls to the built-in function. |
2 | Methods |
The methods to search for are presented as checkboxes
and depends on the object type. For tables, the functions are
grouped according to the RIMD classification:
|
3 | Search button | Runs the search process and opens the Usages window. |
Find usages of can be invoked on declaration identifiers in multiple places:
- Declarations in Object view and Extended view (LeftClick)
- Declarations in Object outline
- The Usages window itself via context menu on blue and bold identifiers in headers
# | Name | Description |
---|---|---|
1 | Usage target | The declaration searched for. Click to navigate back to declaration. |
2 | Heading | The heading contains number of usages filtered out, if any. Click the collapse/expand button to collapse/expand all results. |
3 | Usage | Click a usage to navigate. Right-click to pin. |
4 | Usage context | When a usage is found in a declared context, e.g. within a procedure, Use the context menu to fin usages of the declaration. |
5 | Text filter | Filter result lines by entering a substring search criterion. |
6 | Toggle filter options |
Click the expander to view additional filter options, if available.
Additional filter options are available for these targets:
|
7 | Settings | Click to open the Settings window, which has several settings that influence this window. |
8 | Show where assigned and read | Click this radio button to show all usages, i.e. where the field is assigned or read. Use detailed include options to narrow the results further. |
9 | Show where assigned only (…) | Click this radio button to show where the field is assigned only. Use detailed include options to narrow the results further. |
10 | Save options | Click the save button to set your default Include options for the currently selected radio button group. These settings will survive restart of Prism for AL. |
11 | Collapse all nodes | Collapses all nodes to the module level. |
12 | Collapse/expand to object level | Expands modules and collapses everything else. Shows modules and objects. |
13 | Collapse/expand to object member level | Expands modules and objects and collapses everything else. Shows modules, objects and object members (top-level declarations). |
14 | Expand down to pinned nodes | Expands the paths down to pinned nodes. |
15 | Expand all nodes | Expands the whole tree. |
16 | Copy to clipboard | Copies the filtered result to the clipboard. |
17 | Filter ratio bar | Indicates the ratio of usages shown relative to the total number of usages found. |
When the target of built-in function usages is a table, then the following filter options appear:
# | Name | Description |
---|---|---|
1 | Temporary record filter options | This filter is available when when searching built-in functions of a table object. |
2 | Show all usages (temporary or physical) | Click this radio button when you want to show all usages. |
3 | Zoom in on physical usages |
Click this radio button when you want to focus on
physical (not temporary ) usages only. The trouble is that when a parameter
to a procedure is declared as var (by-reference),
then – whether or not the parameter is declared temporary or note
– the procedure can be called with actual parameters that are both
temporary and physical/normal. So the temporary declaration on var
parameters cannot be trusted (it is not enforced at compile-time and also not at runtime).
Therefore, if you want to be sure to include all physical usages, then you need
to use the option Include all (whether declared physical or temporary).
If you believe that all calls to procedures
with temporary var parameters have actual parameters that are actually
temporary , then you can select the option Only include if declared physical. |
The Flows window is used in a number of flows scenarios. The data is queried from the code graph and the result view shows contextualized nodes, both syntax nodes and dispatch nodes (see below) that satisfy the criteria.
The window is used in the following scenarios:
- Inbound flows: Flows to a specific declaration.
- Outbound flows: Flows from a specific declaration.
- Shortest path: A shortest path between two nodes.
- Reachable committing procedures and triggers: Procedure and triggers that are reachable from a certain declaration and may call
Commit
. - Reachable RIMD invocation sites: Procedure, triggers and dispatch nodes that are reachable from a certain declaration and perform RIMD operations.
Inbound flows and Outbound flows can be invoked from context menus on declaration identifiers:
- Declarations in Object view and Extended view
- Declarations in Object outline
We use the following types of flow nodes:
- Flow nodes:
- Syntax nodes: Elements from AL's syntax trees, such as statements, expressions, identifiers, and operators.
- Dispatch nodes:
These are nodes that are not represented in AL's syntax, but still
play a role in execution of AL code:
- Runtime:
Special nodes that represent a state in program execution, such as
RunCodeunit
, which represents the state that a codeunit must be run. In that way, runtime nodes provide the "glue" between calls toCodeunit.Run()
and the Codeunit'sOnRun
trigger. - User:
Represents the state where a user has interacted with Business Central. For example,
an
Action
node represents a state when a user has clicked a button and aPageFieldValidation
node represents a state where a user has entered data and left a field causing validation.
- Runtime:
Special nodes that represent a state in program execution, such as
- Context nodes: Context nodes show the syntactic context of flow nodes all the way to the module level. Some nodes are both context nodes and flow nodes, such as procedures. We use the flow node symbol for these.
The level of detail in general depends on whether the graph was loaded as a full graph or as a procedure-level graph. However, for Reachable committing procedures and triggers and Reachable RIMD invocation sites, detailed syntax is never displayed.
# | Name | Description |
---|---|---|
1 | Query | Specifies the scenarios and which query was executed to fetch data for this window. |
2 | Results | Headline of query results with various controls. |
3 | Filter message | A message indicating the number of flow nodes currently displayed and how many are filtered away with the current settings. |
4 | Large result set message | This message signals that the result set is large and refresh is slow as defined by settings. When this message occurs, window refresh has been changed to manual, and you need to click the refresh button after doing changes to filters and when changing the search field. |
5 | Contextualized flow nodes | The flow nodes of the search result in their syntactic context, so in a tree structure all the way up to the owning AL module. Syntax nodes within a code context (procedures and triggers) are ordered by the natural order of the source code, which corresponds to a downward flow within each code context. The ordering of context, e.g. modules, objects, object members does not have any semantic significance with regards to flow. Click on any item to navigate. Use the context menu to invoke Find Shortest Path or pin a node. |
6 | Collapse all nodes | Collapses all nodes to the module level. |
7 | Collapse/expand to object level | Expands modules and collapses everything else. Shows modules and objects. |
8 | Collapse/expand to object member level | Expands modules and objects and collapses everything else. Shows modules, objects and object members (top-level declarations). |
9 | Expand down to pinned nodes | Expands the paths down to pinned nodes. |
10 | Expand all nodes | Expands the whole tree. |
11 | Settings | Opens the Settings window. Flow related settings are found in the Find flows and Graph Database Serversections. |
12 | Filters | Toggles the left-hand filter panel. |
13 | Search | Filters the result using a substring search syntax. |
14 | Refresh view button | Click to refresh the view following changes to filters and/or search string. |
15 | Find shortest path | Use this menu to gain insight into the execution path between the declaration and this node. See below. |
16 | Pin/Unpin node | Toggles whether this node is pinned or not. |
17 | Unpinned | Uncheck this to view only pinned nodes and their ancestors. |
18 | Flow child nodes | When unchecked, only the top-most flow nodes are shown. So if a procedure contains flow nodes, only the trigger will show. Nodes in the trigger body are filtered away. |
19 | Leading siblings | When unchecked, the leading siblings are filtered away and what remains is the nesting structure, which is useful if you want to focus on under which circumstances (conditions of branching and repetitive statements) a flow may happen. |
20 | Main filter (dropdown) |
The main filter offers the following values:
|
The result of selecting Find shortest path in the context menu of a flow node is that a new flow window is opened in a mode where:
- Only nodes on a shortest path between the two flow nodes are displayed.
- The ordering of the flow nodes is step-by-step in the order given by the path.
- Flow nodes are numbered.
- The same context may appear more than once (e.g.
when
codeunit A
calls something incodeunit B
, then something incodeunit C
, then something incodeunit B
again.)
# | Name | Description |
---|---|---|
1 | Shortest Path | Indicates that the window displays the shortest path from a selected node to the declaration node in the case of inbound flow, and the shortest path from the declaration node to a selected node in the case of outbound flow. Flow nodes are numbered with steps starting from 1 at the source of the path. |
2 | Source/target nodes | The path's source and target nodes are marked with yellow background. |
3 | Step number | Flow nodes are numbered with steps starting from 1 at the source of the path. |
The Procedural flow graph is a control flow visualization at procedure/trigger level, see procedural flow.
The visualization shows inbound or outbound flows to/from, respectively, a node in the procedural flow graph.
Click the little triangle/graph on the immediate insights line or use the context menu to view the outbound procedural flow graph for a node. Use Shift-click to view the inbound graph.
The window allow you to zoom and pan and nodes can be dragged if you want to organize nodes differently.
# | Name | Description |
---|---|---|
1 | Reset | Repositions dragged nodes to their automatic/initial position and redraws the diagram. |
2 | Save |
Saves the diagram as a .png file.
|
3 | Layout | Selects the overall layout structure. |
4 | Routing | Determines how edges are drawn. |
5 | Direction | Determines the direction when the layout is Layered. |
6 | Depth | Leaves out nodes that farther away from the initial node than indicated by this setting. |
7 | Async layout | Uncheck to fallback to synchronous layout in case of layout issues. |
8 | Search | Highlights nodes that match the search string. |
9 | Initial node | The initial node is high-lighted for each identification of where procedural flows start. |
10 | Procedure | Procedures are white and square nodes. |
11 | Edgs | Edges prepresent procedural flows. |
12 | Event publisher procedure | Notice formatting. |
13 | Dispatch node | Notice formatting. |
14 | Database and Page trigger events | Notice formatting. |
15 | Trigger | Notice formatting. |
16 | Commit | Notice formatting. |
17 | Tooltip | Tooltips give the context. |
18 | + | A trailing '+' indicates that the node has outgoing flows that are currently not visible. This is due to either depth or a general limit on the total number of nodes returned. Similarly, a leading '+' indicates that there are incoming flows that are currently not visible. |
Node context menu:
Menu item | Description |
---|---|
Navigate | Navigates to the code. |
Find Inbound Flow | Opens the Flows window and shows flows to the selected node from anywhere. |
Find Outbound Flow | Opens the Flows window and shows flows from the selected node. |
Find Shortest Path | Opens the Flows window and shows the shortest path from original node to the selected node. |
Show Shortest Path | Highlights the shortest path from the initial node to the selected node. |
Clear Selection | Clears the current selection and select the highlights the initial node. |
This window gives a per table overview of RIMD operations reachable (through procedural flow) from the original procedure or trigger.
Invoke this feature from the context menu on immediate insights.
# | Name | Description |
---|---|---|
1 | Origin | The original trigger or procedure from which outbound reachable RIMD operations are searched. |
2 | Table | A table subject to a RIMD operation reachable from the original procedure or trigger. |
3 | Operation |
All RIMD operations are listed across.
The symbols in brackets indicate the RunTrigger :
|
4 | Checkmark | A checkmark indicates that from the original procedure or trigger, the operation the operation is reachable on the table. |
5 | Search | Filters which tables are shown. |
Table context menu:
Menu item | Description |
---|---|
Reachable RIMD invocation sites | Opens the Flows window and shows nodes (procedures, trigger and dispatch nodes) that are reachable from the original procedure or trigger and which perform a RIMD operation. |
Free text search can be initiated via the menu or by shortcuts (Ctrl-F for searching current object and Ctrl-Shift-F for searching all objects). The search is line by line and allows the substring with wildcards syntax.
In the following example we search for captions that start with the text ledger entry:
# | Name | Description |
---|---|---|
1 | Search expression | Enter search expression – allows the substring with wildcards syntax. |
2 | Scope |
Determines which objects to search:
|
3 | Search/Cancel button |
This button toggles between Search and Cancel:
|
4 | Results limit | Select the max number of results you want the search process to return. |
5 | Source line | Source line within the scope mathing the search expression. Click to navigate. |
6 | Result count | Number of source lines within the scope that matches search expression. |
7 | Collapse all nodes | Collapses all nodes to the module level. |
8 | Collapse/expand to object level | Expands modules and collapses everything else. Shows modules and objects. |
9 | Collapse/expand to object member level | Expands modules and objects and collapses everything else. Shows modules, objects and object members (top-level declarations). |
10 | Expand down to pinned nodes | Expands the paths down to pinned nodes. |
11 | Expand all nodes | Expands the whole tree. |
12 | Copy to clipboard | Copies the search result to the clipboard. |
13 | Settings | Opens the Settings window. |
The search event publishers window is available through the menu of the Workspace window. Use this window to search for event publishers (integration and business):
# | Name | Description |
---|---|---|
1 | Search expression | Enter a substring with wildcard search expression that will be matched against the event (publisher method) name. |
2 | Scope | Select which objects to search (all or currently selected in Object index). |
3 | Search button | The button is only available when a search expression has been entered. If you want to search for all event publishers, then Click to execute the search. |
4 | Search results | Search results are grouped by module and object. Use the expander in the header to expand/collaps all. |
5 | Result (publisher) | Click to navigate. |
6 | Copy to clipboard | Copies search results to the clipboard. |
The search fields window is available through the menu of the Workspace window. Use this window to search fields by name:
# | Name | Description |
---|---|---|
1 | Search expression | Enter a substring with wildcard search expression that will be matched against the field name. |
2 | Scope | Select which objects to search (all or currently selected in Object index). |
3 | Search button | The button is only available when a search expression has been entered. Click to execute the search. |
4 | Search results | Search results are grouped by module and object. Use the expander in the header to expand/collaps all. |
5 | Result (publisher) | Click to navigate. |
6 | Copy to clipboard | Copies search results to the clipboard. |
The search procedures window is available through the menu of the Workspace window. Use this window to search procedures (including event publishers and subscribers) by name:
# | Name | Description |
---|---|---|
1 | Search expression | Enter a substring with wildcard search expression that will be matched against the procedure name. |
2 | Scope | Select which objects to search (all or currently selected in Object index). |
3 | Criteria |
Use the checkboxes to include/exclude as appropriate:
|
4 | Search button | The button is only available when a search expression has been entered. Click to execute the search. |
5 | Search results | Search results are grouped by module and object. Use the expander in the header to expand/collaps all. |
6 | Result (publisher) | Click to navigate. |
7 | Copy to clipboard | Copies search results to the clipboard. |
Explore table relations is invoked from the Object context menu.
The basic idea is simple: the selected table is opened and shown with all inbound and outbound table relations. The selected table is then "fully explored" in the 1st degree connections. However the related tables may themselves have further, yet unexplored table relations:
# | Name | Description |
---|---|---|
1 | Node (table) | Here the initial table on which the explore table relations was initiated. |
2 | Unexplored incoming table relations | The Item Ledger Entry table still has 22 inbound table relations to be explored. See the node context menu below. |
3 | Unexplored outgoing table relations | The Item Ledger Entry table still has 21 outbound table relations to be explored. See the node context menu below. |
4 | Edge | Each edge in the graph represents that there is at least one table relation from the source table to the target table. Right-click to invoke context menu. |
5 | Layout algorithm | Select a layout algorithm after your liking. |
6 | Direction | Select the direction of the layout. |
7 | Detailed | Check for detailed view (default) where counts of unexplored ingoing and outgoing relations is displayed. |
8 | Included objects | List of included objects. See below for how object can be included and excluded again. |
9 | Excluded objects | List of objects that have been excluded after having been included. |
10 | Selecting tables | Select a single table by clicking on it in the diagram or in the Included objects list. You can select multiple tables by holding down the Ctrl key. To action selected objects, right-click to invoke the context menu (described below). |
11 | Redraw | Force redraw of diagram. |
Notice that nodes are draggable with the mouse. However, wait with fine-tuning layout positioning, as whenever a new table is added or removed from the diagram, it it is redrawn with the selected layout algorithm.
Edge context menu:
Menu item | Description |
---|---|
Show Details | Runs the find usages process to find all table relations from the source table to the target table. |
Node context menu:
Menu item | Description |
---|---|
Explore All Inbound | Adds all tables that have table relations targeting are the table on which the context menu was invoked. |
Explore Selected (Inbound) | Like Explore all inbound, but allows you to select which tables to include. |
Explore All Outbound | Adds all tables that have table relations to the table on which the context menu was invoked. |
Explore Selected (Outbound) | Like Explore all outbound, but allows you to select which tables to include. |
Explore All In/Outbound | Add all inbound and outbound tables to the diagram. |
Navigate to Object | Navigates to the object. |
Selected nodes context menu:
Menu item | Description |
---|---|
Exclude X Selected | Here X is the number of currently selected objects. Excludes the selected objects from the diagram and adds them to the Excluded objects list. |
Exclude X Unselected | Here X is the number of included objects that are currently not selected. Excludes the unselected objects from the diagram and adds them to the Excluded objects list. |
The transfer fields mapping is available from
Object view
and
Extended view
when TransferFields
has two different tables
for source and target. Invoke by using the context menuy on TransferFields
.
Alternatively, this window can be opened via the object context menu (enabled for tables, only).
Use this window to see how fields are mapped. The mapping includes fields from all extensions that are part of the workspace. The mapping is sorted by field number, as this what the mapping is based on (not the field name).
The following is a mapping of TransferFields(TimeSheetDetail)
in table 5510 "Employee Time Reg Buffer"
:
# | Name | Description |
---|---|---|
1 | Source object |
The source table for the mapping, i.e. where values are copied from.
This is the argument to
TransferFields , here Time Sheet Detail .
|
2 | Target object |
The target table for the mapping, i.e. where values are copied to.
This is the record on which
TransferFields is called, here Employee Time Reg Buffer .
|
3 | Direction |
The direction of the TransferFields (from source on the right to target on the left)
corresponding to target.TransferFields(source) .
|
4 | Search | Enter a search string to filter fields by name. |
5 | Change direction | Swaps source and target tables. |
6 | Field number | The field number of a field in the source and/or target tables. |
7 | Target name | Name of field with the row's field number in the target table. This is left blank if the source table does not have any fields with that number. |
8 | Target type | The type of the field in the target table. This is left blank if the target table does not have any fields with that number. |
9 | Source type | The type of the field in the source table. This is left blank if the source table does not have any fields with that number. |
10 | Source name | Name of field with the row's field number in the source table. This is left blank if the source table does not have any fields with that number. |
11 | Mapping indicator | Indicates whether the field is mapped or not with additional information added by different icons and tooltip. Not mapped: The field is not mapped (either source or target does not have this field number). Mapped ok: The field is mapped (both source and target have this field number).
Mapped error: The field is mapped and the types of the source and target fields differ which can lead to issues. These are the cases:
|
Enter or paste in a prism path to navigate to the path in the current workspace.
The file explorer is available from the "File | Explore" menu. Use the file explorer to understand which files make up the workspace.
# | Name | Description |
---|---|---|
1 | Packages | This is a "virtual directory" representing Prism for AL's package cache restricted to packages relevant for the currently open workspace. |
2 | Package file | Package files have a context menu, see below. |
3 | Workspace |
This is a "virtual directory" that represents to root of one or more
Visual Studio Code projects (directories with app.json files). For single directory projects,
the workspace represents the directory.
For .code-workspace projects, folders are represented as directories below
workspace.
|
4 | .al files |
Files with AL code (.al files) have the objects they contain as children.
|
5 | Objects | AL objects have a separate context menu. |
File context menu:
Menu item | Description |
---|---|
Open Text File | Opens the file with your default text editor. |
Open | Opens the file with your default editor for the file extension. |
Copy to Clipboard | Copies the contents of the file to the clipboard. |
AL object context menu:
Menu item | Description |
---|---|
Go to Object | Navigates to the object. |
Copy to Clipboard | Copies the object source code to the clipboard. |
If Prism cannot parse (or index) a compilation unit for some reason, this is indicated in the Workspace window once the workspace has been loaded:
# | Name | Description |
---|---|---|
1 | Error indicator | This link is displayed only when there are parse errors. Click to open the Compilation unit errors window (see below.) |
2 | Error count | Parse error count per module. This column is only displayed when there are parse errors. |
Here is what the Compilation unit errors windows looks like:
# | Name | Description |
---|---|---|
1 | Search | Filters the result list to errors where the Message column contains the the substring entered. This is useful when there are many parse errors and you want to verify which errors are similar. |
2 | Error |
Each error has a Path to the
The actual error in this case is a (new) property Click on a row to show the Details. |
3 | Details | This part of the window shows details of the error. |
4 | Error position |
When available, the position of the error is indicated with ^------- .
|
5 | Source | The source code is diplayed i grey until the point where parsing fails. This is to give context to the error. |
6 | Copy diagnostics info to clipboard | Use this context menu to copy diagnostics info to clipboard. To report a bug, paste this information into the Feedback window. |
If Prism encounters errors generating a code graph for some objects, this is indicated in the Workspace window once code graph generation has finished:
# | Name | Description |
---|---|---|
1 | Error indicator | This link is displayed only when there are graph generation errors. Click to open the Graph diagnostics window (see below.) |
Here is what the Graph diagnostics windows looks like:
# | Name | Description |
---|---|---|
1 | Error table | Errors are at object level, presented with module, object type and name. Click on a row to view the error details. |
2 | Error details | Call stacks for the error selected in the error table. |
3 | Copy to clipboard | Copies diagnostics info for all object to the clipboard. To report potentially multiple bugs, paste this information into the Feedback window. |
4 | Copy diagnostics info to clipboard | Use this context menu to copy diagnostics info of a single error to the clipboard. To report a bug, paste this information into the Feedback window. |
Prism for AL Connector
Prism for AL Connector is our Visual Studio Code extension that allows you to navigate to Prism for AL from any line of code in Visual Studio Code.
Prism for AL Connector is available on Visual Studio Marketplace. Install from the Marketplace or directly from Visual Studio Code (search for extension prism-al).
The extension has a single configuration, Prism for AL exe file. Leave this setting blank if you have installed Prism for AL in the default location.
In Visual Studio Code, from any cursor position of an object in an .al
file, right-click
and select View in Prism for AL. This will:
- Start Prism for AL (if not already running)
- Open the folder or workspace in Prism for AL (if not already open)
- Navigate to the object and position closest to the cursor in Visual Studio Code
Command-line interface
The command-line executable, StaticalPrismCmd.exe
is registered as a so-called execution alias by
the MSIX installer, so by magic, if you type StaticalPrismCmd.exe
in a command shell you will get the
correct MSIX installed version regardless of the PATH
environment variable.
For help, run StaticalPrismCmd.exe -h
. You can also get help on the specific command like
the report command: StaticalPrismCmd.exe -h report
. Furthermore, you can get help on a specific report:
StaticalPrismCmd.exe report onprem-usages -h
.
You can specify a workspace as either a directory or a .code-workspace
file.
When integrating a report into a Continuous Integration pipeline, consider using options --log-file
and --strict
.
Analyzes a workspace and produces a tab-separated cross-reference of object dependencies with dependency types.
Use StaticalPrismCmd.exe -h report object-dependencies
for available options.
Example: StaticalPrismCmd.exe report object-dependencies "C:\workspace\LearnPrism" -o "c:\tmp\object-dependencies.csv"
Analyzes a workspace and produces a tab-separated list of unreferenced objects.
Use StaticalPrismCmd.exe -h report unreferenced-objects
for available options.
Example: StaticalPrismCmd.exe report unreferenced-objects "C:\workspace\LearnPrism" -o "c:\reports\learn\object-dependencies.csv"
Analyzes a workspace, builds a code graph and produces a tab-separated list of
references to procedures and objects that are OnPrem annotated.
Use StaticalPrismCmd.exe -h report onprem-usages
for available options.
Example: StaticalPrismCmd.exe report unreferenced-objects "C:\workspace\LearnPrism" -o "c:\reports\learn\onprem-usages.csv --log-file c:\tmp\onprem-usages.log --strict"
Opens the Prism for AL application on a workspace. If Prism for AL is already running, no new instance is used,
If the workspace is already open, then it is not reopened.
Use StaticalPrismCmd.exe -h open
for all available options.
Example: StaticalPrismCmd.exe open "C:\workspace\LearnPrism"
Troubleshooting
Symptom: Solution shows unexpected unresolved modules:
The tooltip gives a hint to the reason. In this case, the Base Application and System packages are unavailable because they have not been downloaded from Visual Studio Code, so use the Visual Studio Command AL: Download symbols, then reload the workspace.
Click on a line to view details such as which dependencies made Prism for AL want to resolve this module.
We can help trouble-shoot the issue for. Please refer to the
Trobleshoot menu in the control panel window and email us the
.wrec
file.
Symptom: You opened a folder which is not a
Visual Studio Code project folder, i.e. a folder with no
app.json
file directly in the folder,
and the module is not listed in the
Solution's General tab.
The cause is likely that the package is a runtime package. To verify this, check the Discovery tab:
Prism for AL cannot load runtime packages as they are encrypted, so the only remedy for this issue is to use a normal (not runtime) package, if possible.
Symptom: Solution shows a package with no objects, but you know the package contains objects:
This is perfectly normal for dependency-propagation-only modules such as Application.
If this happens for other packages that you know contain objects, then it is most likely
because the package is a runtime package. When you use AL: Download symbols,
then Visual Studio Code will download an .app
file with symbol file with no objects.
There is currently no way to decude that the downloaded .app
file
is a runtime package so Prism shows this as a package without objects.
The only remedy for this issue is to publish a normal (not runtime) package.
Symptoms: The workspace window indicates compilation unit errors.
If a workspace compiles with the AL compiler in Visual Studio Code, Prism for AL should be able to parse and analyze it. To diagnose, do the following:
- Use AL: package to run the AL compiler in Visual Studio Code; if that fails, fix the error and reload the workspace.
- If you have changes workspace files in Visual Studio Code (or another tool), please reload the workspace.
- If the steps above do not explain or fix the issue, then please report a bug via the Feedback window or email us at feedback@stati-cal.com. See compilation unit errors for how to get the error details that you can include in your description.
Symptoms: The workspace window indicates graph errors.
If you encounter any graph errors, please report a bug via the Feedback window or email us at feedback@stati-cal.com. See graph errors for how to get the error details that you can include in your description.
Symptom: The Control panel license heading is 'Community Edition', the license status indicates an error (red text, e.g. 'invalid' or 'expired') and the message in the lower part of the control panel also indicates an issue:
For details about the error, check out the tooltip on the license status as indicated in the screenshot above.
When the license is not valid, Prism for AL runs in a feature-limited mode until you paste in a valid license key.
If you have just entered the license, most likely you have not copied the whole license key, by accident copied an old key, or the license key is for Prism for C/AL instead of Prism for AL.
If the license has expired, please contact your license administrator.