Thursday 30 November 2017

Announcing Microsoft Dynamics NAV 2018!!

Hello, those of us that are familiar with Dynamics NAV, Microsoft usually releases a new version of NAV around this time of the year! As usual Microsoft has not disappointed. They will be releasing Dynamics NAV 2018 today.
Here is what we expect according to Dynamics NAV community.

The release date of Dynamics NAV 2018:
The wait is finally over and Marko Perisic announced in Madrid last week that we will have the publishedDynamics NAV 2018 on December 1st. 

Dynamics NAV 2018 and VS Code Extension v2:
Dynamics NAV 2018 will allow partners to use Visual Studio Code for Extensions v2. This will allow partners to get ready for new Dynamics NAV 2018 R2 version which will be released in spring of 2018. 

Same code two names: 
Dynamics NAV 2018 R2 and Dynamics 365 "Tenerife" will have the same codebase even though the names are totally different to each other which might change in near future. for more information follow this link



What's New in NAV 2018 - 

1. Ceridian payroll - Import payroll transaction files from Ceridian HR/Payroll in US and Ceridian Powerpay in CA by installing the Ceridian Payroll extension.

2. Quickbooks File Import
Import payroll transaction files in the Quickbooks IIF format by installing the Quickbooks Payroll File Import extension.

3. Integration API
Adding a REST API based on web services with easy-to-use authentication.The entities in the API can be used on their own or in combination with extensions when there is a need to add user interface elements or business logic Dynamics NAV.

The first iteration of the API publishes common record types, including company information, customer, vendor, employee, item (product), sales order, sales invoice, account, and journal.

4. Synchronize Vendors with Lexmark ICS
You can now take advantage of vendor synchronization when using Lexmark ICS. This will improve the vendor recognition rate in the Lexmark ICS and allow manual selection of vendors when performing visual training of new invoice layouts.

5. Personalize your workspace
With our upcoming personalization tool built directly into Dynamics NAV, all it takes is a few clicks to display the right data for your role and your business or optimize for data entry in the browser.

6. Preview and Print Reports
Invoices, tax reports, checks and balance sheets - our upcoming Report Preview feature will display all kinds of reports directly in Dynamics NAV without having to download as a file.
You will also be able to print directly from the browser.

7. Analyzing Financial Statements in Microsoft Excel
In the Business Manager and Accountant Role Centers, you can choose which financial statements to view in Excel from a drop-down menu in the Reports section of the ribbon. When you choose a statement, it will be opened in Excel or Excel Online. An add-in connects the data to Financials.

8. 3 Checks per Page
A new format has been created for check printing.  You now have the ability to print 3 checks per page to save paper and make check printing faster.


9. Full CRM Synchronization can be run in background

10. Submission of EC Sales List with more than 9999 lines

Sources - Oksana Kuzmina Blog.

What Developer need to focus -

  • Start using/learning visual studio code.
  • Start selling and usage of web client instead of windows client.  
  • Start using events & subscription & Events. 
Future is the cloud, VS Code, customization with events & web client. Here is in the video below from microsoft.
Source Saurav Dhyani blog

Wednesday 22 November 2017

Dynamics NAV Document Posting in CSIDE/CAL

Hello there, as you work around in Dynamics NAV, there might be a time where you need to create and post for example a sales order in code. If you are new to Dynamics NAV, this might appear a daunting task. In the next few minutes, i will take you through the process. First a briefing.
Posting is the process where the system captures the information in the document and uses it to update the Sub Ledgers and General Ledger.
For example, if the sales order contains an item on the line. The system will update the item ledger entries, Vendor ledger entries, VAT account and Receivables Account. You can see the details when you navigate a customer ledger entry after posting.

All the posting in the system is achieved from Journals and that's the work of a document posting routine, to create journal entries which are posted to the various ledgers
So to post your sales order, simply create the document and call the posting routine. Posting routine reside in code units. Here is how it's done.

Note
I will assume you have already created a table to handle document data which you will then process into invoices using the posting routine.
I will also assume you have a page linked to the table above where users enter data and run the posting routine.

Your document posting routine should look like this

// SalesHeader is a record variable of table 36

//SalesLine is a record variable of table 37
//SalesPost is a codeunit variable of codeunit 80
//Invoices is a table where the document data is stored

SalesHeader.INIT; // Initializes the document & a document No. is given
        CLEAR(SalesHeader);

//Creating the invoice Document
        SalesHeader."Document Type" := SalesHeader."Document Type"::Invoice;
        SalesHeader.VALIDATE("Document Date",WORKDATE);
        SalesHeader.VALIDATE(SalesHeader."Posting Date",WORKDATE);
        SalesHeader.VALIDATE(SalesHeader."Sell-to Customer No.",Invoices."Student ID");

// This hides the dialog that prompts users to post
        SalesHeader.SetHideValidationDialog(TRUE);
        SalesHeader.VALIDATE(SalesHeader."Bill-to Customer No.",Invoices."Bill to No.");
        SalesHeader.VALIDATE(SalesHeader."VAT Bus. Posting Group",'DEFAULT');
        SalesHeader."Posting No. Series" := '';
        SalesHeader."Posting No." := 'TEST0001';// No for Sales header
             
        SalesHeader.INSERT(TRUE);// Inserts the record into Table 36
        // Creating the Sales Lines
        LineNo += 100000;
        SalesLine.INIT;
        CLEAR(SalesLine);
        SalesLine."Document Type"         := SalesLine."Document Type"::Invoice;
        SalesLine."Document No."          := SalesHeader."No.";
        PatientInvoiceNo                  := SalesHeader."No.";
        SalesLine."Line No."              := LineNo;
        SalesLine.VALIDATE("Sell-to Customer No.",SalesHeader."Sell-to Customer No.");
        SalesLine.VALIDATE(Type,Invoice.Type::"G/L Account");
        
        SalesLine.VALIDATE(Quantity,1);
        SalesLine.VALIDATE("Unit Price",Invoices.Price);// 
        SalesLine.VALIDATE(SalesLine."VAT Bus. Posting Group",'DEFAULT');
        SalesLine.VALIDATE(SalesLine."VAT Prod. Posting Group",'DEFAULT');
        SalesLine.INSERT(TRUE);

//Clears the posting codeUnit (80) of any data
        CLEAR(SalesPost);

// Runs the Document posting codeUnit 80 which posts the invoice document
        SalesPost.RUN(SalesHeader);// This call to the posting routine actually executes the posting


Good Luck

Wednesday 15 November 2017

Dynamics NAV AUTOSPLITKEY (Automatically inserting a primary key value each time a new record is created)



Hello there. You could be new to CSIDE Dynamics NAV Development & in need of a way to automatically generate primary key value each time a new record is inserted in the table.
Such a method has been used in areas like Sales Lines, Gen. Journal Line TABLES and others.
Considering the Sales Lines Example, the line No. is automatically inserted each time a new record is created.
Here is how to do it.

  • Create a table and make sure the field whose values are to be automatically inserted is of type INTEGER and part of the primary key.
  • Create a page where users enter the records. Set the AUTOSPLITKEY property of that page to yes
  • Try running the page
  • Insert some values
In my example;
I created a STUDENT table where STUDENT ID is automatically created each time a user creates a new student.
I also created a STUDENT page and set the AUTOSPLITKEY property of the page to yes


That was all i had to do.


Notice how that field is populated each time a new record is inserted.
click here for more information

Was this blog helpful ?
Please leave a comment

Friday 10 November 2017

Dynamics NAV - How to run a Report based on a set of records in CAL Code


Hello, during one of my projects, i realised the need to run a certain report based on a set of records.
In other wards, before i execute the report, i need to filter out the data. The result set in the filter is what i display in the report. All using code.
You might also need to do the same thing. It's simple just follow this.
Filter the table records that you want displayed on the report
CAL gives you a number of functions that allow you filter records in a table. Some of these include
SETRANGE, SETFILTER among others.
Use your preferred method to filter the records you want

Execute the report using the function call
REPORT.RUNMODAL(Number [, ReqWindow] [, SystemPrinter] [, Record])
The function takes on 4 values.
The first value is the OBJECT ID (Report Object ID) which is an integer
The second value is a boolean specifying whether to display the report request page
The third value  is a boolean specifying whether to use the system default printer - 
specified in printer settings of your PC
The fourth value is record (The table you filtered on)
Here is an example

Customer.RESET;// (Customer is a record of table 18)
Customer.SETRANGE("No.",10000);
IF Customer.FINDFIRST THEN
REPORT.RUNMODAL(50053, TRUE,TRUE,Customer);

Alternatively
CLEAR(Report50053);
Customer.SETRANGE("No.",Rec."No.");
Report50053.SETTABLEVIEW(Shipment);
Report50053.RUN;
The above code will execute report 50053 based on customer whose No. is 10000
A request page will be displayed as well
For more information on this topic click here

I would like to hear your thoughts
Please leave a comment and follow for more.
Good luck