Command Line
The command line is a way to run common tasks by typing a short command into the Global Search box instead of clicking through screens. It can open a record, run a search, add a note, update field values, open an editor in Admin, and more. Because every command is plain text, a command can also be turned into a link and sent to a user, which makes it a lightweight integration option alongside the Direct URLs.
Turning it on
The command line is controlled by the Command Line switch in Admin under Main Options in the Special Settings section. When the switch is off, the Global Search box is only a search box and command links go to the Home screen. The switch is on by default.
Typing a command
Click in the Global Search box, or press Ctrl+Shift+F from anywhere, and type a greater-than sign followed by the command. For example, >record 4412 opens record 4412 and >search Invoices opens the search form for the Invoices Record Type. Anything typed without the greater-than sign is a normal search, so users who never learn about commands are not affected.
Type >help to open the Command Line panel. It lists every command the signed-in user is allowed to run, with a short description, and a History tab of recent commands. Clicking a command in the list puts it in the search box ready to edit. Holding Ctrl while clicking runs it. The Up and Down arrow keys in the search box also step back through recent commands.
Rules that apply to every command
Commands are not case sensitive. Words are separated by spaces. When a name or value contains a space, put it in double quotes, for example >set . "Vendor Name"="Acme Inc" or >form "Expense Report".
A period on its own stands for the record that is currently open. So >note . Approved adds a note to the open record, and >set . Status=Closed updates it. A command that needs a record and is given a period when no record is open stops with a message asking for a record ID.
Names do not have to be typed in full. A command that takes a Record Type, E-form, user, team, trigger, or Add-In name first looks for an exact match, then for a name that starts with what was typed, then for a name that contains it. If more than one name matches, the command stops and lists the candidates so the right one can be chosen. Quote the full name to be exact.
Variables work everywhere in a command. Standard variables such as [USERNAME], [TODAY], [TODAY-7], and [DMTEMP:name] are replaced before the command runs, using the open record as the context when there is one. This is the same variable engine used throughout DocMgt, so anything that works in a workflow action or an E-form works here.
Commands run with the rights of the signed-in user. A record that the user cannot edit cannot be updated by a command either, and commands that open Admin editors are only listed for administrators.
A command that changes a record, such as set or note, finishes by opening that record so the result is visible. If the record was already open it simply refreshes.
Sending a command as a link
Any command can be run from a link of the form https://yourserver/cli?c={command}. The person opening the link signs in if they are not already signed in and is then brought back to the command. Several commands can be sent in one link by separating them with semicolons. Spaces in the URL must be encoded as %20, so it is easiest to let DocMgt build the link.
To build a link, type >link followed by the command, for example >link note . Please review the attached invoice. The link is copied to the clipboard and shown on screen. A period is replaced by the ID of the open record when the link is built, so the link always refers to that specific record. Variables are left in the link as typed, so a variable such as [USERNAME] is filled in for the person who opens the link, not the person who created it.
When a link contains a command that changes data, the command does not run on its own. The Command Line screen shows each command with the variables already filled in, marks the ones that change data, and waits for the person to press Run. Commands that only open a screen or run a search run as soon as the link is opened. This protects users from links that would change records just by being clicked.
When a link runs several commands and one of them fails, the screen stays open with the result of each command shown, and offers an Open Record button for any record the other commands changed.
The full list of commands is in the Command Line Reference topic.