D365 Business Central Archives - Page 29 of 36 - - Page 29

Category Archives: D365 Business Central

Creating a Control Add-in using Javascript and calling it in AL.

Introduction: In NAV 2017, control add-ins were called through .NET code which is imported as .ZIP files. With NAV 2018 .NET is not supported in extensions. Thus we’ve to perform the following steps to make a Control Add-in in Javascript. Pre-requisite: 1. NAV-2018 2. VS Code Procedure: Create a Startup script as start.js: Startup scripts are loaded whenever the NAV object containing the control add-in starts. Basically, the startup scripts are used for initialization. Create a Javascript file as demo.js : Contains most of the logic that the control add-in performs.  Create a control add-in object in AL: Control Add-in objects are used by NAV to register the control add-in and events and procedures on which the control add-in works. Create a NAV object using AL: This object generally contains the control add-in integrated into the standard, created or customized NAV objects. This object acts as the starting point where events are performed. Output: Added Control Add-In: Invoking on INIT: Script Invoking on Event: Conclusion: Thus, we can create control add-in using Javascript and access in NAV .AL objects using extensions

Share Story :

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 :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Categories

Secured By miniOrange