Posts

Showing posts with the label Dynamics NAV

Different use of AL Find Functions for Filters in Dynamics 365 Business Central

Image
This post provides tips about different find function in Business Central, including both long-standing C/AL strategies and newer concepts like partial records. FindSet vs FindFirst/FindLast FindSet and FindFirst/FindLast are two methods utilized in Dynamics 365 Business Central for extracting records from a table. The key distinction between them is that FindSet fetches a group of records, whereas FindFirst only fetches the initial record in the filter and FindLast fetches the last record. FindSet is employed when there’s a need to traverse through a sequence of records, and it’s advisable to use FindSet(true) if there’s a requirement to alter any record within the group. Conversely, FindFirst/FindLast is employed when only the initial or last record is needed and there’s no requirement for a loop. SetLoadFields  The SetLoadFields function only loads the specified fields, thereby not fetching the remaining fields in the table and ensuring a quicker load. It is suitable for searchi...

How to call Web Service (GET/POST) from MS Dynamics NAV C/AL

Image
//Get url := 'https://httpbin.org/ip'; CREATE(WinHttp); WinHttp.Open('GET',url,FALSE); WinHttp.Send(JsonTxt); JsonTxt := WinHttp.ResponseText; MESSAGE(FORMAT(JsonTxt)); //Post url := 'https://reqbin.com/echo/post/json'; CREATE(WinHttp); WinHttp.Open('POST',url,FALSE); WinHttp.SetRequestHeader('Content-Type', 'application/json'); CREATE(XMLDoc); NodeText := XMLDoc.createTextNode(''); NodeText.appendData('{ "Id": 78912'); NodeText.appendData( '"Customer": "Jason Sweet",'); NodeText.appendData('"Quantity": 1,'); NodeText.appendData( '"Price": 18.00}'); WinHttp.Send(NodeText.nodeValue); JsonTxt := WinHttp.ResponseText; MESSAGE(FORMAT(JsonTxt)); Variables: Name DataType Subtype Length ResponseStream InStream     ResponseBuffer BigText   ...

A good VS code extension for MS Dynamics 365 Business Central AL Development

Image
  As we know Microsoft has moved the D365 Business Central development environment to VS code. In the Dynamics NAV which was in the native development tools. Now everything is code based and no visual tools are there for object navigation and table, page or report creation.  The good news is I have found a nice extension in VS Code which will be very helpful for the developers.  Name of the extension is  AZ AL Dev Tools/AL Code Outline for Visual Studio Code ( Visit Marketplace ) It has features like: AL objects wizards Symbols browser AL symbols outline panel Symbols tree view AL code generators Code actions Code transformation commands Action images browser Custom editors Documentation comments support Code analyzers rules viewer Document syntax visualizer Also you can use the extension to create the objects (table pages etc.) visually like previous and it will auto generate AL code for the objects: These are the wizards to create new AL object file: Table Wizard T...

Microsoft Dynamics 365 Business Central vs. Dynamics NAV

Image
All versions of Business Central are currently available, so you can make the transition whenever it makes sense for your business. Making the switch to Business Central is not so different than any other NAV upgrade. For example, if you’re running NAV 2015, you might have been considering an upgrade. Now, instead of upgrading to a newer version of NAV, you’ll transition to Business Central. User licenses. Business Central does not offer concurrent user licenses as NAV does. Instead, each license has a named user. NAV customers will be offered two Business Central named users for each NAV concurrent user. Also, instead of NAV’s Limited User license, Business Central has a Team Member license, which offers the same level of access and functionality. Subscription model. Just as they did for NAV, Microsoft offers both perpetual and subscription licenses for Business Central, although the subscription model is certainly the most popular. Because Business Central has named user...

How to find the difference between two dates and return the corresponding number of months in Dynamics NAV

Image
You could use a variable Calendar > Record > Date IF ( FromDate <> 0D ) and ( ToDate > FromDate ) THEN BEGIN Calendar . RESET ; Calendar . SETRANGE ( "Period Type" , Calendar . "Period Type" :: Month ); Calendar . SETRANGE ( "Period Start" , FromDate , ToDate ); Months := Calendar . COUNT ; END ELSE Months := 0 ; The problem with this type of code is 01 Jan 07 to 01 Feb 07 will return 2 Months. When it is only 1 month 1 day! 31/01/06 and 01/02/06 will be 1 month between 01/01/06 and 28/02/06 will be 2 Months Date Difference in months.

How to design graphical RDLC report in Microsoft dynamics NAV 2018

Image
First we need to create a table for the graphical report. Lets create a new table which will contain budget and actual amount of different accounts with the following fields: Save the table as  Graphical Report Table. Now  i nsert following data into the table for example: Our table is ready for the Report. Now go to report section and click new to create a new report. In the report designer enter the table number or name as DataItem. Then select the table fields under the DataItem. Now select  View > Layout from main menu. The report layout will be open in visual studio. (If visual studio is not installed in your computer SQL report designer may open but I recomand Visual Studio for RDLC report design). in the visual studio report design choose chart from toolbox menu. Then create a chart you want from the list. Here i choose the first one for this example. In the chart data section select Actual and Budget field Sum in Value section. And Name...