Posts

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...

How to send email from a table in SQL Server

Image
Create a new table named  System Generated Email in SQL Server Database: CREATE TABLE [dbo].[B$System Generated Email]( [No] [int] NOT NULL, [To Address] [varchar](250) NOT NULL, [From Address] [varchar](100) NOT NULL, [From Address Title] [varchar](250) NOT NULL, [CC Address] [varchar](250) NOT NULL, [Email Subject] [varchar](MAX) NOT NULL, [Email Body] [varchar](MAX) NOT NULL, [Sent] [tinyint] NOT NULL, [Email Sending Date] [datetime] NOT NULL, [Email Sending Time] [datetime] NOT NULL, CONSTRAINT suppliers_pk PRIMARY KEY (No) ) This table will contains all system generated emails. Now we need to write a SQL Procedure which will create emails from  System Generated Email Table and send through the SQL email profile. Email profile can be found in Database Mail option: SQL code for sending Email: USE msdb GO DECLARE @email_id varchar(250), @from_mail varchar(250), @c...

Microsoft Dynamics NAV - Creating and Consuming a Codeunit Web Service

Image
We can create any code unit in Dynamics NAV and publish it as web-service. To do that we need to go to the page (form in 2009)  "Web Services".  In the Web Services page, choose New. In the Object Type column, select Codeunit, then in the Object ID column enter the Codeunit Number, and then enter a name in the Service Name column. This name will be the web-service name to consume.  Mark the check box in the Published column and choose OK to close the New - Web Services page. Webservice Form (2009) Verifying the Web services availability. Make sure flowing services are running in server. In Browser write the service URL to check if the service published successfully, Change the localhost with ip for remote server : http://localhost:7047/DynamicsNAV/WS/Services  If everything is ok you should see the published services names in the browser. Now lets try to consume the service. In this example we will see how to consume the service fr...