Table Basics and the TableType Property

In this post I will tell something about tables, especially about the basics and a new property that has been introduced in NAV 2016, the Tabletype property.

The basics:

– Every table has properties and triggers
– Every table field also has properties and triggers
– Every table has keys and field groups
– Keys also have properties

So let’s check the properties of a table. To do that, go to the object designer and edit a table by clicking the Design button. After clicking the Table Designer open. Now press Shift + F4 to see the properties of a field. In order to view the table properties go to an empty line and press Shift + F4. You will now see a list of table properties. For example:

Enable: enable or disable the field
Editable: configure the field to be editable
NotBlank: forces the user to specify an entry in this field

In Microsoft Dynamics NAV 2016 you can define two types of external tables: Microsoft Dynamics CRM tables and SQL Server tables. You create an external table by specifying the type of in the TableType property. On MSDN you can find more information about this functionality ‘TableType Property

There are four table triggers:

– OnInsert
– OnDelete
– OnRename
– OnModify

There are two field triggers
– OnValidate
– OnLookup

Keys
A Primary Key is used to make each record unique in a table. Of course a table can have more keys. The first key is automatically the primary key. A key can consist of 1 or more fields. The second, third etc. are secondary keys.

Advertisements

Management Cmdlets for Microsoft Dynamics NAV 2016

Microsoft Dynamics NAV 2016 (build 42815) comes with a module called ‘Microsoft.Dynamics.Nav.Management’. When you import this module you will get the ability to run the following  Powershell Cmdlets:

Copy-NAVCompany
 Dismount-NAVTenant
 Export-NAVApplication
 Export-NAVData
 Export-NAVEncryptionKey
 Export-NAVServerLicenseInformation
 Get-NAVAddIn
 Get-NAVAppInfo
 Get-NAVApplication
 Get-NAVAppTenant
 Get-NAVCompany
 Get-NAVDataFile
 Get-NAVDataUpgrade
 Get-NAVServerConfiguration
 Get-NAVServerInstance
 Get-NAVServerPermission
 Get-NAVServerPermissionSet
 Get-NAVServerSession
 Get-NAVServerUser
 Get-NAVServerUserPermissionSet
 Get-NAVTableConnection
 Get-NAVTenant
 Get-NAVWebServerInstance
 Get-NAVWebService
 Import-NAVData
 Import-NAVEncryptionKey
 Import-NAVServerLicense
 Install-NAVApp
 Invoke-NAVCodeunit
 Mount-NAVApplication
 Mount-NAVTenant
 New-NAVAddIn
 New-NAVCompany
 New-NAVDatabase
 New-NAVEncryptionKey
 New-NAVServerConfiguration
 New-NAVServerInstance
 New-NAVServerPermission
 New-NAVServerPermissionSet
 New-NAVServerUser
 New-NAVServerUserPermissionSet
 New-NAVTableConnection
 New-NAVWebServerInstance
 New-NAVWebService
 Publish-NAVApp
 Remove-NAVAddIn
 Remove-NAVApplication
 Remove-NAVCompany
 Remove-NAVServerInstance
 Remove-NAVServerPermission
 Remove-NAVServerPermissionSet
 Remove-NAVServerSession
 Remove-NAVServerUser
 Remove-NAVServerUserPermissionSet
 Remove-NAVTableConnection
 Remove-NAVWebServerInstance
 Remove-NAVWebService
 Rename-NAVCompany
 Repair-NAVApp
 Resume-NAVDataUpgrade
 Set-NAVAddIn
 Set-NAVServerConfiguration
 Set-NAVServerInstance
 Set-NAVServerPermission
 Set-NAVServerPermissionSet
 Set-NAVServerUser
 Set-NAVWebServerInstanceConfiguration
 Start-NAVDataUpgrade
 Stop-NAVDataUpgrade
 Sync-NAVTenant
 Uninstall-NAVApp
 Unpublish-NAVApp

I will focus on specific NAV Cmdlets in future posts so stay tuned!

NAV 2015 Administration Tool Icon is missing

In certain scenarios I can’t locate the shortcut to the ‘NAV 2015 Administration Tool’. So I’ve done some research. This problem happens if NAV has been installed by another user account. When you login as a different account you can’t find this specific Tool. As a workaround you can then easily create a new shortcut. The shortcut target should look like this:

C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell.exe  -NoExit -ExecutionPolicy RemoteSigned " & ' C:\Program Files\Microsoft Dynamics NAV\80\Service\NavAdminTool.ps1 ' "

Of course it’s also possible to start the Administration tool from the Powershell ISE by loading the NavAdmin Tools.ps1 module by using the Import-Module cmdlet.

Howto – Use Powershell ISE on Windows Server 2008 R2

Powershell ISE (Integrated Scripting Environment) is a powerful feature of Windows Server 2012 R2, Windows 7, Windows 8.1 etc. It’s also possible however to work with Powershell ISE on a Windows Server 2008 R2 machine.

To enable Powershell ISE please perform the following steps:

Open a Powershell window en run the following cmdlets:

Import-Module ServerManager
 Add-WindowsFeature Powershell-ISE

The Add-WindowsFeature Cmdlet will install the Powershell ISE feature. That’s it! After you’ve installed the ISE it should be possible to start Windows Powershell ISE from the Start Menu.