- Getting Started
- Download and Install
- Load Objects
- Browse Your C/AL Code
- Questions & Answers — or How do I …?
- How do I find usages of objects, procedures, fields, variables and keys?
- How can I find out where Sales Invoices are deleted via code?
- I find it cumbersome to export objects all the time, can Prism help me?
- We're using version control for C/AL objects — can we access the objects directly from there?
- How can I find an object if I don't remember the exact name?
- I know part of a procedure name, how can I quickly find the procedure?
- A user got an error message — how do I find the code causing this?
- How can I share a search result with a colleague?
- Which versions of NAV are supported?
- Special Features
- Exploring Table Relations
- Included Objects
- Excluded Objects
- Visual Options
- Exploring Table Relations
1. Download and Install
First you need to download and install Statical Prism. Head over to the Try or Buy sections to download your copy of Statical Prism. You will then either have a trial license or a commercial license. The installer is straight-forward. Once you have installed, continue from here.
2. Load Objects
When Statical Prism starts up, it shows the control panel window.
The control panel gives several options for getting objects into Statical Prism. To begin with, we recommend that you simply export all NAV objects of your favourite NAV code-base in text format. (You can read about other options further down.)Now simply open the text export file by choosing "Open File Store…" in the control panel and locate the export file.
3. Browse Your C/AL Code
When Prism finishes loading the store, you can start browing your C/AL code. First, select an object in the left-hand index of objects. The middle part then displays the object in a tree-like structure, and on the right, you see an outline of what's in the object, which objects the current object is Used By, and which objects the object Uses.
Take a few minutes to familiarize yourself with the user interface and navigation.
Whenever something is declared, such as object, procedures, variables and parameters, notice that the cursor changes to a "context menu style", when the cursor is hovering over the name. This indicates that here a context menu is available via the mouse's right-click. For a declaration, the most prominent context menu is "Find Usages".
Now click on a procedure name in some object. Notice that the cursor changes to a hand when the cursor is hovering over the name of a procedure in a procedure call. This indications that you can navigate to the declaration by left-clicking the name — "Goto Declaration".
Continue now to use Prism or read the Questions and & Answers section for answers to topical questions and
Questions & Answers — or How do I …?
How do I find usages of objects, procedures, fields, variables and keys?
Activate the context menu and select "Find Usages". This context menu is available in the left-hand side Index, in the right-hand side Explorer and in declarations in the (middle) object view.
From the result window, click a line to navigate to the "usage site".
How can I find out where Sales Invoices are deleted via code?
In the Index, right-click the Sales Invoice table and select "Find System Function Usages—". The select System Functions DELETE and DELETEALL and hit the "Search" button:
From the result window, click a line to navigate to the "usage site".
You can use a similar search for other useful things, of course. The feature works for all supported object types, as long as you are searching for something in the form "object.SYSTEMFUNCTION".
I find it cumbersome to export objects all the time, can Prism help me?
Yes, Statical Prism allows you to set up mirrors that connect directly to Dynamics NAV 2013+ databases. Statical Prism will then track and export object changes for you.
First you need to set up a mirror. From the control panel, open the mirror manager using the mirror icon or through the menu:
In the Mirrors screen, hit the "+" button or choose menu "File | New Mirror…". Give the mirror a name, select an NAV Adapter (there is only one available at the moment), and fill in Database Server and Database Name fields. If you want to connect to the database with Windows authentication, then leave the fields Database User Name and Database User Password empty. Finally, select "Full Path To FinSql.exe". Press the "Test this mirror" button to validate that the information you have entered. Press the "Save" button to save the mirror.
Statical Prism will now and then (by default every 10 minutes) try to synchronize new/changed/deleted objects from the mirrored database. The first synchronization exports all objects. Subsequent synchronizations will only export the new and changed objects.
To force synchronization, press the "Synchronize all mirrors now" button. Go for a coffee, as this can take a couple of minutes as all objects will be exported.
When the syncronization has finished, open the mirror store from the Mirrors screen, or from the control panel using the "Open Mirror Store…" button.
While you have a mirror store open, Statical Prism continues to synchronize in the background. However, the changes are not applied until you reload the store. When updates are availble, a little icon gets enabled, and allows you to reload the mirror:
The Mirror integration method for the Dynamics NAV database is via an adapter component, which is currently only developed for Dynamics NAV 2013 (and later) versions. But there is no reason why adaptors for earlier version could not be developed. We have open-sourced the adapter component in the hope that someone in the NAV community will help develop further integration options.
If you experience problems with mirrors then please check out the trouble-shooting page.
We're using version control for C/AL objects — can we access the objects directly from there?
Statical Prism can open any directory containing C/AL objects in individual, as long as the files are in text format. When you use version control, you must have a workspace somewhere with the objects in text format.
Statical Prism supports a number of directory structure formats:
- Unstructured Directory: No restrictions on file names and folder structures (other than file name extension must be .txt)
- Prism Directory: This is Statical Prism's "native" directory layout
- ReVision Directory: This is the directory layout used by iFacto ReVision
Typically, you will just use the Unstructured Directory format. To open such store, simply click the "Open Directory Store" buton in the control panel and select the root folder holding your NAV objects in text format.
Notice that when you update your workspace from version control, then you need to reload the store. You can do that by closing the store, and then use Ctrl-1 in the control panel. That opens the most recently opened store.
How can I find an object if I don't remember the exact name?
You can use the little search field in the Index. Hover the mouse over the field and read the tool-tip for an explanation of the syntax. Here is an example:
You will find similar search fields in various places in Statical Prism.
I know part of a procedure name, how can I quickly find the procedure?
If you know the name contains "export" and "xml" in that order, use menu "Search | Procedures by Name…"and search for "export*xml":
You can find table fields in a similar way.
A user got an error message — how do I find the code causing this?
Let's assume the error message was "You cannot create this type of document when Vendor 12345 is blocked with type Payment".
It's a fair assumption that the error message is defined as a Text Contant in NAV, so you can use Statical Prism's "Search Text Constants by Content…". The trick is now to guess which part of the error message is text "variable", i.e. generated from place-holders in the Text Constant. In this case a good guess is that we should be searching for Text Constants matching this pattern: "you cannot*this type of document when *is*". Enter this search string in Statical Prism and hit the Search buton:
Now navigate to the Text Constants to figure out which of these usage is the correct one. Then use "Find Usages" on that Text Constants, and you have found the code causing this error message.
How can I share a search result with a colleague?
Which versions of NAV are supported?
Statical Prism supports NAV versions from NAV 5 SP1 to NAV 2018. Maybe earlier versions of NAV are supported, too, but we have not tested.
Exploring Table Relations
Sometimes a picture is worth a thousand words. Statical Prism can visualize table relations in a flexible and interactive way.
Let's start with an example. In the graphic below we have found table 289 Payment Method in the index, then right-clicked it and selected "Explore Table Relations" - and further explored relations a bit.
|1||The table id and name|
|2||The number of unexplored inbound table relations (relations from other tables into the table).|
|3||The number of unexplored outbound table relations (relations from the table into other tables)|
The basic idea is simple: the selected table is opened and shown with all ingoing and outgoing table relations. The selected table is then "fully explored" in the 1st degree connections. However the related tables may themselves have further unexplored table relations.
Right-clicking on a table in the graph will show a context-menu with these options:
|Explore all inbound (+n)||Add the remaining n unexplored inbound table relations to the graph.|
|Explore selected inbound (+n)||Open a list of the remaining n unexplored inbound table relations and choose which ones to add to the graph.|
|Explore all outbound (+n)||Add the remaining n unexplored outbound table relations to the graph.|
|Explore selected outbound (+n)||Open a list of the remaining n unexplored outbound table relations and choose which ones to add to the graph.|
|Explore all in/outbound (+n)||Add the remaining n unexplored inbound and outbound table relations to the graph.|
|Exclude n selected||Exclude n selected tables (and their relations) from the graph. Don't worry, these can be included again by selecting them in the Excluded Objects panel on the right, right-clicking and selecting the Include n Selected menu item.|
|Show details||(Not applicable for tables; see Table Relation Details below)|
|Navigate to object||Open the object in Prism (in the background window).|
Note that it is possible to select multiple tables and explore them all simultaneously, in which case the above menu items will show the accumulated number of table relations to explore.
Also note that some tables have a huge number of inbound and/or outbound table relations, such as table 18 (Customer). In that case it can be beneficial to hide certain tables and their relations. To do that simply left-click and drag the mouse to select the tables to exclude, then right-click on one of the selected tables to exclude the entire selected from the graph.
Table Relation Details
Given a table relation (a line/curve between two boxes), it is possible to investigate where in the source code the table relation occurs. To do that, simply right-click on a line/curve and select the only option available: Show details. This action will perform a Find Usages search with the given table relation.