Quantcast
Channel: FORNAV
Viewing all articles
Browse latest Browse all 372

Importing ForNAV layouts and language files using PowerShell

$
0
0

When using a built pipeline to deploy a new Business Central installation it is also required to be able to install ForNAV layouts and language files without manual intervention

 

To do this, the ForNAV layout and language files need to be uploaded to Azure blob storage

 

And access to the folder needs to be set to “Public read access for blobs only”

 

 

The URL to the blob is then copied by right clicking on the blob

 

To import layouts the codeunit 6188504 “ForNAV Report Layout Import” is used where the method “Import” takes the URL as an argument. To perform the import the PowerShell cdmdlet Invoke-NavCodeUnit is used

 

Invoke-NavCodeUnit -CodeunitId 6188504 -MethodName Import -Argument ‘https://reportpacktest.blob.core.windows.net/importtest/Default.fornavlayouts’ -ServerInstance BC200 -CompanyName ‘CRONUS International Ltd.’

 

To import language translation the codeunit 6189180 “ForNAV Language” is used where the method “Import” takes the url as an argument. To perform the import the PowerShell cmdlet Invoke-NavCodeUnit is used

 

Invoke-NavCodeUnit -CodeunitId 6189180 -MethodName Import
-Argument ‘https://reportpacktest.blob.core.windows.net/importtest/ForNAVTranslations%20(1).csv’ -ServerInstance BC200 -CompanyName ‘CRONUS International Ltd.’

 

Default behaviour is replace when the record already exists or create if not

 

GitHub can also be used to store the files needed. Once a file is uploaded to a GitHub repository (which must be readable wo. Auth) the URL can be retrieved by clicking on the raw button

 

The post Importing ForNAV layouts and language files using PowerShell appeared first on ForNAV.


Viewing all articles
Browse latest Browse all 372

Trending Articles