Category Archives: D365 Business Central
Setup multiple No. Series for a single field in NAV
Introduction: This blog shows how multiple number series are to be set up for a single field in NAV. The number series has to be setup dynamically on Assist-Edit of the page. Pre-requisite: NAV 2017 Demonstration: 1. Create a No. Series : Create a number series in the No.Series and then create a relationship. 2. Create a field in Sales & Receivable Setup which has relation No. Series Table: 3. On the Card Page Enable the AssistEdit property for that field. On the Assist Edit Trigger add a function call and Update the current page: This function checks whether the field No.Series is present in the Sales & Receivables Setup and then runs the No.Series via RUNMODAL using SelectSeries and selects the current series using SetSeries function. 4. Result: Conclusion: Thus, by this method, multiple customized No. Series can be added to a single field.
Share Story :
Error resolution to the error “You are not authorized to sign in. Verify that you are using valid credentials and that you have been setup as a user in Microsoft Dynamics NAV”
Introduction: When we restore the SQL database from one server to the other server and when we launch the Microsoft Dynamics NAV RTC, we the error “You are not authorized to sign in. Verify that you are using valid credentials and that you have been setup as a user in Microsoft Dynamics NAV”. This blog article gives the steps how to resolve this error. Pre-requisites: Microsoft Dynamics NAV SQL Server Management Service(SSMS) Reason for the error: When an SQL backup is restored from one server to the other, even the Windows users created in the previous server is restored to the new server which is not present. Hence, the error is thrown. Steps: 1. Open SSMS and select the database restored. 2. Click on new query and type in the below query. USE [Database Name] GO delete from [dbo].[User] delete from [dbo].[Access Control] delete from [dbo].[User Property] delete from [dbo].[Page Data Personalization] delete from [dbo].[User Default Style Sheet] delete from [dbo].[User Metadata] delete from [dbo].[User Personalization] 3. Enter the database name and click on execute. 4. Now restart the server instance and launch the Role Tailored Client(RTC) and make sure a windows user is made in users in the RTC.
Share Story :
Expense management in NAV 2018
Introduction: In previous versions of NAV, employees had to be set up as vendors to post expenses. Now, NAV 2018 allows expenses to be posted against employee cards, with a range of tools to simplify the process. Features: In NAV 2018, in the Account type field a new value of Employee is added. Create Journal entries directly for employees – only supports local currency (LCY) Employee posting group, definable on the employee card. Make payments to the employee in the Payments Journal. Get payment suggestions with a full list of outstanding employee payments. Apply payments to open employee entries in one go, linking the payment to the employee journal entry and closing both. Correct mistakes with unapply payments. Posting a general journal line with Employee as account type or balancing account type will generate an employee ledger entry. When posting a general journal line for an employee, the Document type field must be either blank or set to Payment. Conclusion: This feature is very useful for Reporting purpose as well as to maintain Employee wise details in the system.
Share Story :
How to configure Visual Studio Code(VS Code) for Extensions in Microsoft Dynamics NAV 2018
Introduction: Developement in Microsoft Dynamics NAV 2018 through extensions is done using Visual Studio Code. This article gives the steps how to configure Visual Studio Code on Microsoft Dynamics NAV 2018 for Extensions. Pre-requisites: Microsoft Dynamics NAV 2018 CU 1 Visual Studio Code. Steps: 1. Run the Microsoft Dynamics NAV 2018 setup, click on Add or remove components then click on the Modern Development Environment and select Run from My Computer. 2. Open Dynamics NAV Administration Console, select the server instance and click on Edit. 3. Under the Development tab at the bottom, Enable Developer Service Endpoint and Enable loading application symbol references at server startup. 4. Download Visual studio code from here and install VS Code. Method 1: 1. Open Microsoft VS Code and click on the Extension button at the left hand corner. 2. Install AL Formatter and AL Language. 3. Click on File and click on Open folder and select your folder containing objects in .al format 4. In the launch.json file enter the below credentials. 5. Click on Ctrl+Shift+P and click on download Symbols. This will download the symbols successfully. and VS Code is configured for extension in NAV 2018 . Method 2 : 1. Unstall AL Formatter and AL Language. 2. Open Microsoft VS Code and click on Extensions under View Menu. 3. This will prompt you to select .vsix file. 4. Navigate to C:\Users\<user name>\Downloads\CU 01 NAV 2018 NA\NAV.11.0.19846.NA.DVD\ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment and select the .vsix file. and click on OK. 5. In the launch.json file enter the below credentials. 6. Click on Ctrl+Shift+P and click on download Symbols. This will download the symbols successfully and VS Code is configured for extension in NAV 2018.
Share Story :
Converting NAV C/AL Objects into AL using TXT2AL converter tool
Introduction: When migrating from NAV 2017 to NAV 2018 i.e moving from C/AL to AL the created objects need not be created again from scratch in AL. This blog demonstrates how we can create the AL objects from C/AL using Txt2Al in Command Prompt. Pre-requisite: NAV 2018. Backup of Objects in TEXT or FOB format. Steps: 1. Import objects in NAV 2018 from the created .TXT or .FOB files. In NAV Development Environment goto, Files > Import > Choose the .FOB or .TXT file > Replace all the objects 2. Export the objects in New Syntax to .TXT files. Create a directory to store the objects in .TXT format which will be exported as new syntax. Here, ‘source’ is the name of the directory used. Use ‘mkdir source ‘ Create a directory to store the .AL that will be created by TXT2AL Converter utility. Here ‘target’ is the name of the directory used. Use ‘mkdir target’ To export the objects in .TXT format in NewSyntax use the following command where Source Directory = ‘source’ Filename = ‘CU0-5.txt’ Database Name = ‘Demo Database NAV (11-0)’ SQL Server Instance = ‘.\NAVDEMO’ Type of Object = ‘codeunit’ ID = ‘50000..50005’ —-is the ID range Similarly, for Tables: Type of Object = ‘table’; ID=’50000..50005′;filename=’TAB0-5.txt’ Pages: Type of Object = ‘page’; ID=’50000..50005′;filename=’PAG0-5.txt’ Queries: Type of Object = ‘query’; ID=’50000..50005′;filename=’Query0-5.txt’ Reports: Type of Object = ‘report’; ID=’50000..50005′;filename=’REP0-5.txt’ Menusuite: Type of Object = ‘menusuite’; ID=’50000..50005′;filename=’MS.txt’ XMLPort: Type of Object = ‘xmlport’; ID=’50000..50008′;filename=’XMLPort.txt’ NOTE: TXT2AL requires objects exported in New Syntax 3. Generate the .AL object files using the TXT2AL converter. To generate the .AL file from the .TXT files from source folder, run the following command where Source Directory = ‘source’ Target Directory = ‘target’ –rename = Used to create new .AL file per new object and give it the appropriate name of the ID and name. Conclusion: Thus, in this way, we can convert the objects in C/AL to AL format. Although the conversion is not 100% perfect but, most of the redundant work can be avoided.
Share Story :
Work Description field in Sales Quote in NAV 2017
In NAV 2017, Microsoft have added new field in Sales Area i.e. Work Description, which help users to add details about the Sales Quote and which gets copied over to Sales Invoice. This is the important field for the Sales people to give special instructions which can be used for Production if the goods are to be produced or for Stores department or Dispatch department for trading goods. The field is used to stored detailed information about the Order. There is no limitation on number of characters and it gets copied over to Posted Sales Invoice. It is a small feature in the system introduced in NAV 2017 but can be very useful.
Share Story :
How to Customize Microsoft Dynamics NAV Startup Screen
Dealers must guide out how they need information, for example, stock, requests, clients, and items to move through every framework. At that point, they should assemble a stage that bolsters these streams. This requires a group with broad information on your frameworks to have the option to fabricate a custom combination arrangement without any preparation. Microsoft dynamics nav upgrade provides you all of this Explanations behind structure a custom coordination including your business having incredibly remarkable necessities or the requirement for unlimited oversight and responsibility for venture. You should have the option to assemble, uphold, and keep up the incorporation. On the off chance that you have the correct prerequisites to legitimize it, at that point custom reconciliation could be best for you. Introduction: This blog describes how to change the screen while loading Microsoft Dynamics NAV Pre-requisites: Microsoft Dynamics NAV Steps: 1. Navigate to the path C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\Images. 2. Open the splash screen in Paint and save it with extension .png. I’ve added the text ‘Happy New Year’. 3. Copy and replace the image in the above folder. 4. Launch Microsoft Dynamics NAV.
Share Story :
Improvements in Microsoft Dynamics NAV 2018 Webclient
Introduction: Microsoft Dynamics NAV 2017 Web client had limitations such as the reports couldn’t be previewed. The reports could be saved as .pdf file but we couldn’t preview the reports as we could do in the Windows Client. With the new release of Microsoft Dynamics NAV 2018, there is availability of Print Preview for non-Internet Explorer browsers. Pre-requisites: Microsoft Dynamics NAV 2018.(with Web Client set up) Summary: 1. Previewing a report in the Dynamics NAV Web client was only possible in Internet Explorer, but is now possible on all supported browsers with the release of Microsoft Dynamics NAV 2018. 2. Now, we can preview a report directly in the client by choosing the Preview button on report request pages. This displays the report by using the new PDF Viewer control, which enables us to use our keyboard and mouse to navigate the report and download it to our computer. 3.The report preview in the Web client has been refurbished with a new design and additional features. It works with all supported browsers. We preview a report by choosing Preview on the report options page. A toolbar provides several features for working with the report, such as zooming in and out, downloading to file, and more. Two new features include selecting text and panning: • Select text This feature lets you select one or more words, paragraphs, or rows in the report, and then copy and paste it somewhere else, like a page in Financials or a Microsoft Word document. • Pan the document This feature lets you move the visible area of the report in any direction, so you can view other areas. This is helpful when you have zoomed in to see details. Limitation of Microsoft NAV 2018 Web client are mentioned in the below link- https://docs.microsoft.com/en-us/dynamics-nav/browser-limitations-with-the-microsoft-dynamics-nav-web-client
Share Story :
Creation of Reports using AL Extension in Microsoft Dynamcis NAV Development Preview
Introduction: This blog demonstrates the creation of Reports through extensions in Microsoft Dynamics NAV Development Preview Environment(Microsoft Dynamics 365 for Financials and Operation, Business Edition). Pre-requisite: Microsoft Dynamics NAV Development Preview Environment Visual Studio Code with AL Extensions Demonstration: 1. Creating a Report using AL extensions. report 50100 MyReport { UsageCategory = ReportsAndAnalysis; ApplicationArea = All; CaptionML = ENU = ‘MyCustomerList’; RDLCLayout = ‘ReportLayouts/MyReport.rdl’; // WordLayout=’ReportLayouts/MyReportWord.docx’; // DefaultLayout=Word; dataset { dataitem(DataItemName; Customer) { column(CustomerName; Name) { } column(CustomerNumber; “No.”) { } } } requestpage { layout { area(content) { group(GroupName) { field(HideDetails; HideDetails) { } } } } actions { area(processing) { action(ActionName) { } } } } var HideDetails: Boolean; } 2. Creating a Page Action to run the Report using AL extensions. pageextension 50100 MyExtension extends “Customer List” { layout{ } actions { // Add changes to page actions here addlast(“&Customer”) { action(ShowMyReport) { ApplicationArea = All; trigger OnAction(); begin clear(myReport); myReport.Run; end; } } } var MyReport : Report MyReport; } 3. Installing the extension and executing the Report, the results are blank as the Layout for the Report is not set. 4. To create the layout, search for ‘Report Layout Selection’. 5. Then select the report added through the extensions and Export the template. 6. Open the RDL Export file in SSRS or Visual Studio and add the relevant fields or tables. 7. In the Visual Studio Code add the following lines of code. RDLCLayout=<PATH of RDL File>; UsageCategory = ReportsAndAnalysis; ApplicationArea = All; 8. Viewing the Report Conclusion: Thus according to the NAV 2018, the report when created in C/SIDE automatically has an RDL file associated with it. But when creating reports through extensions separately the layout needs to be created.
Share Story :
Implementing extensions in NAV Development Preview using Docker
Introduction: This blog describes Container, Docker, and Benefits of using Containers. As containers was a new functionality in Microsoft Dynamics NAV Development Preview from September Update, this document also demonstrates creating containers and how to implement extensions using containers. Also, it includes saving the image into Azure Container Registry Service. Pre-requisites: Microsoft NAV Development Preview(December update) Visual Studio Code(VS Code) Description of Containers: 1. What is a Container? A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. Available for both Linux and Windows based apps, containerized software will always run the same, regardless of the environment. Containers isolate software from its surroundings, for example differences between development and staging environments and help reduce conflicts between teams running different software on the same infrastructure. 2. Why do we use container? When you are running an app on a computer, you stand the risk that it will conflict with everything else on the machine. If two apps are having the same name and utilizing the same folder structure on the hard drive, there is a conflict and if 2 apps are using different versions of the same DLL, there might be problems.With a container, you achieve a higher level of isolation. Each container has its own file system, its own registry, its own network layer with its own published ports, and of course its own memory space – kind of like a virtual machine, just without the fat guest operating system. 3. What is a Docker? Docker is the company driving the container movement and the only container platform provider to address every application across the hybrid cloud.Docker enables true independence between applications and infrastructure and developers and IT ops to unlock their potential and creates a model for better collaboration and innovation. 4. Implementing Docker: What is a Docker Image? An image is an inert, immutable, file that’s essentially a snapshot of a container. Images are created with the build command, and they’ll produce a container when started with run. Images are stored in a Docker registry such as registry.hub.docker.com. i. List of Docker Images ii. List of Containers PS C:\Users\cfadmin> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c45e57849c56 microsoft/dynamics-nav:devpreview-finus “powershell -Comma…” 14 hours ago Up 2 minute s (healthy) 80/tcp, 1433/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:7046-7049->7046-7049/tcp, 7045/tcp, 0.0.0.0:8080->8080/t cp navserver iii. Creating a new Container PS C:\demo> docker run -e ACCEPT_EULA=Y a9 Initializing… Starting Container Hostname is 0b04fbea782e PublicDnsName is 0b04fbea782e Using NavUserPassword Authentication Starting Local SQL Server Starting Internet Information Server Creating Self Signed Certificate Self Signed Certificate Thumbprint 52600A924814D5A8848D7990BC3F76F7FB6FAF66 Modifying NAV Service Tier Config File with Instance Specific Settings Starting NAV Service Tier Creating DotNetCore NAV Web Server Instance Enabling Financials User Experience Creating http download site Creating Windows user admin Enabling SA WARNING: This license is not compatible with this version of Dynamics NAV. Creating NAV user WARNING: This license is not compatible with this version of Dynamics NAV. WARNING: This license is not compatible with this version of Dynamics NAV. Container IP Address: 172.18.232.162 Container Hostname : 0b04fbea782e Container Dns Name : 0b04fbea782e Web Client : https://0b04fbea782e/NAV/WebClient/ NAV Admin Username : admin NAV Admin Password : Tyvo6712 Dev. Server : https://0b04fbea782e Dev. ServerInstance : NAV Files: http://0b04fbea782e:8080/al-0.12.15359.vsix http://0b04fbea782e:8080/certificate.cer Initialization took 105 seconds Ready for connections! Note: Instead of full Image ID starting few characters can be used as Identifiers. Image Name can also be instead of Image ID. Download the Certificate from the URL and installed in Enterprise Trust, Trusted Publisher. iv. Viewing the created Container PS C:\demo> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORT S NAMES 0b04fbea782e a9 “powershell -Comma…” 3 hours ago Up 3 hours (healthy) 80/t cp, 443/tcp, 1433/tcp, 7045-7049/tcp, 8080/tcp stupefied_stonebraker ca1980d041c6 microsoft/dynamics-nav:devpreview-finus “powershell -Comma…” 28 hours ago Up 6 hours (healthy) 80/t cp, 1433/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:7046-7049->7046-7049/tcp, 7045/tcp, 0.0.0.0:8080->8080/tcp navserver Newly Created Container with name as ‘stupefied_stonebraker’ and ID as ‘0b04fbea782e’ 5. In Visual Studio Code: i. Contents of Launch.json file ii.Contents of App.json file iii. Contents of Code unit which displays a Hello Message iv. Contents of Customer Card which Creates a field and an action that triggers the CodeUnit above v. Contents of Customer Table Extension that adds a field vi. in the Extension Management Pane vii. Action in Customer Action vii Displaying Hello Message viii. Added field in the Customer Card Page 6. Merging the Containers in Image and Managing with Azure Container Service i. Comitting the Container ‘stupefied_stonebraker’ to Image ‘microsoft/dynamics-nav:devpreview–finus’ PS C:\Users\vmadmin> docker stop stupefied_stonebraker stupefied_stonebraker PS C:\Users\vmadmin> docker commit stupefied_stonebraker microsoft/dynamics-nav:devpreview-finus sha256:eca05b64ed3619c688225685613e27fb4dbb6823aee46e24e96f3d813158440f ii. Tag the Image ’ microsoft/dynamics-nav:devpreview–finus’ as ‘navcontainerregister.azurecr.io/dynamics-nav:v1’ and push the committed image to Azure Container Service PS C:\Users\vmadmin> docker tag microsoft/dynamics-nav:devpreview-finus navcontainerregister.azurecr.io/dynamics-nav:v1 PS C:\Users\vmadmin> docker login –username NavcontainerRegister –password 6QiIyg9ICAa=aEg1jL2Wp8JumxvfPAEd navcontainerregister.azurecr.io Login Succeeded PS C:\Users\vmadmin> docker push navcontainerregister.azurecr.io/dynamics-nav:v1 The push refers to a repository [navcontainerregister.azurecr.io/dynamics-nav] 79bb52c8ab0d: Preparing 9c54b1a40ebc: Preparing 0d828dcd4895: Preparing b52bf723b284: Preparing 4beec416a215: Preparing 282537c6428c: Preparing b786ae432ac1: Preparing b07b88fd6145: Preparing 28c2b5be05f7: Preparing cc91b1f75f98: Preparing 7305c5891baa: Preparing bb5530559b18: Preparing 021428a01c82: Preparing 13b346524402: Preparing cda2d40c0d33: Preparing 64efa9cbaf9b: Preparing aa2b81bfb0aa: Preparing 505553846eae: Preparing 7a83b9538cb1: Preparing 20c2a3ed5225: Preparing 5437ac367abf: Preparing c856f8e0a2f7: Preparing f358be10862c: Preparing b07b88fd6145: Waiting 28c2b5be05f7: Waiting cc91b1f75f98: Waiting 7305c5891baa: Waiting bb5530559b18: Waiting 021428a01c82: Waiting 13b346524402: Waiting cda2d40c0d33: Waiting 64efa9cbaf9b: Waiting aa2b81bfb0aa: Waiting 505553846eae: Waiting 7a83b9538cb1: Waiting 20c2a3ed5225: Waiting 5437ac367abf: Waiting c856f8e0a2f7: Waiting f358be10862c: Waiting 282537c6428c: Waiting b786ae432ac1: Waiting b52bf723b284: Pushed 9c54b1a40ebc: Pushed 4beec416a215: Pushed b07b88fd6145: Pushed 282537c6428c: Pushed b786ae432ac1: Pushed cc91b1f75f98: Pushed 28c2b5be05f7: Pushed bb5530559b18: Pushed 021428a01c82: Pushed cda2d40c0d33: Pushed 13b346524402: Pushed aa2b81bfb0aa: Pushed 64efa9cbaf9b: Pushed 505553846eae: Pushed 20c2a3ed5225: Pushed 79bb52c8ab0d: Pushed c856f8e0a2f7: Skipped foreign layer f358be10862c: Skipped foreign layer 0d828dcd4895: Pushed 7305c5891baa: Pushed 7a83b9538cb1: Pushed 5437ac367abf: Pushed v1: digest: sha256:0aa9bfe03388e4fa20f83fcac99dafdf1933f58a2aed9d1c8bb2d05d162f062e size: 5343 iii. Azure Container Registry Repository: Pushed Image into Container Registry in Repositories Conclusion: These are the actions that can be performed on Container using Docker and how extensions are developed on Containers.