Advertisements

Dynamics 365 Business Central 2019 wave 2 – Released

The 2019 release wave 2 for Business Central delivers plenty of new features and capabilities.

Dynamics NAV customers upgrading to Business Central on premises will enjoy the unique flexibility to continue running on premises, move to the cloud, or adopt a hybrid approach.

You can download the product ​​​from Microsoft Product Download Page. Select your desired country link to download product specific to your country. You will require partner source or customer source login to access.

Direct link to W1 Product is here.

With the 2019 release wave 2, users access Business Central in the browser, Windows 10 desktop app, mobile apps on Android and iOS, or in Outlook.

The 2019 release wave 2 is the first version that does not include the classic development environment (also known as C/SIDE) or the Dynamics NAV Client connected to Business Central (also known as the Windows client).

The modern developer experience based on Visual Studio Code now supports developing large apps such as the base application from Microsoft, and so C/SIDE is discontinued for Business Central going forward.

Business Central 2019 release wave 2 moves to the Modern Support Lifecycle Policy effective October 1, 2019. This policy requires that the customer maintain the Enhancement Plan and deploy updates as noted in the servicing policy.

The Modern Lifecycle Policy requirements are defined below:

  1. Customers must stay current as per the servicing and licensing requirements published for the product or service.
  2. Customers must have the rights to use the product or service.
  3. Microsoft must currently offer support for the product or service.

BC Product Life Cycle

DYNAMICS 365 BUSINESS CENTRAL LICENSING PROGRAMS

License for Dynamics 365 Business Central will be sold through the following programs:

– Cloud Solution Provider Program (CSP) – Dynamics 365 Business Central

– D​​ynamics Price List (DPL) – Dynamics 365 Business Central on-premises ​

This section lists features that are planned to release from October 2019 through March 2020. Because this topic lists features that may not have released yet, delivery timelines may change and projected functionality may not be released

This colour (This feature is released. ) dates shows which features have been released for public preview or early access and for general availability. Below list is updated as per information available at the time of writing this post.

Application enhancements

Feature Enabled for Public preview General availability
Allow non-sequential numbering End users, automatically Oct 1, 2019
Cancel reminders and finance charge memos End users, automatically Aug 1, 2019 Oct 1, 2019
Carry line descriptions to G/L entries when posting End users, automatically Aug 1, 2019 Oct 1, 2019
Create records and convert prospects with better templates End users, automatically Aug 1, 2019 Oct 1, 2019
Use the Copy Document function on blocked lines End users, automatically Aug 1, 2019 Oct 1, 2019
Aged Accounts Payable includes External Document Number field End users, automatically Sep 1, 2019 Oct 1, 2019
Batch-post sales and purchases as scheduled End users, automatically Sep 1, 2019 Oct 1, 2019
Reconcile payables with the External Document Number field End users, automatically Sep 1, 2019 Oct 1, 2019

Application lifecycle management

Feature Enabled for Public preview General availability
Detailed notifications for update events Admins, makers, or analysts, automatically Oct 1, 2019
Multiple production environments Admins, makers, or analysts, automatically Oct 1, 2019
Report production outage in the Business Central Administration Center Admins, makers, or analysts, automatically Oct 2019
Support for performant data upgrade from C/AL tables to AL tables Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Ability to download a database export file Admins, makers, or analysts, automatically Nov 2019

Empower ISV acceleration

Feature Enabled for Public preview General availability
Design for extensibility Admins, makers, or analysts, automatically Aug 1, 2019 Oct 2019

Migrations to Business Central online

Feature Enabled for Public preview General availability
Enhancements for customer migration tools Admins, makers, or analysts, automatically Oct 2019

Modern clients

Feature Enabled for Public preview General availability
Add links to your navigation menu End users, automatically Aug 1, 2019 Oct 1, 2019
Add notes and links to data End users, automatically Aug 1, 2019 Oct 1, 2019
Enhancements to Excel integration End users, automatically Aug 1, 2019 Oct 1, 2019
Filter reports more efficiently End users, automatically Aug 1, 2019 Oct 1, 2019
Full keyboard shortcut support End users, automatically Aug 1, 2019 Oct 1, 2019
General user experience adjustments End users, automatically Aug 1, 2019 Oct 1, 2019
Get an overview of all business features End users, automatically Aug 1, 2019 Oct 1, 2019
Identify the company by a badge End users, automatically Aug 1, 2019 Oct 1, 2019
Longer timeout period for the server connection End users, automatically Aug 1, 2019 Oct 1, 2019
Modern clients only for Business Central Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Personalize actions on your Role Center End users, automatically Aug 1, 2019 Oct 1, 2019
Resize columns with fewer clicks End users, automatically Aug 1, 2019 Oct 1, 2019
Save and personalize list views End users, automatically Aug 1, 2019 Oct 1, 2019
Switch between companies in your business inbox in Outlook End users, automatically Aug 1, 2019 Oct 1, 2019
Multitask across multiple pages End users, automatically Aug 15, 2019 Oct 1, 2019
Customize user profiles without writing code End users, automatically Sep 1, 2019 Oct 1, 2019
Enter data with speed and agility End users, automatically Sep 1, 2019 Oct 1, 2019
Filter option fields by multiple values End users, automatically Sep 1, 2019 Oct 1, 2019

Modern developer tools

Feature Enabled for Public preview General availability
Translating other extensions Admins, makers, or analysts, automatically Oct 1, 2019
Access modifiers Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Attach and debug next Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Base application delivered as AL applications Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Convert tables from C/AL definitions to AL table definitions Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Database insights made available in AL Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Filtering XmlPort Objects End users by admins, makers, or analysts Aug 1, 2019 Oct 1, 2019
Implementing hierarchical menus End users by admins, makers, or analysts Aug 1, 2019 Oct 1, 2019
Improved app dependency handling on build and deploy Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
More power to developers using Designer Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019

Service fundamentals

Feature Enabled for Public preview General availability
New Support Request option in the Business Central Administration Center Admins, makers, or analysts, automatically Oct 2019
Partners can enter support contact details in the Business Central Administration Center Admins, makers, or analysts, automatically Oct 2019
Lock-free number series End users, automatically Aug 1, 2019 Oct 1, 2019
Page background tasks Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Surrogate keys Admins, makers, or analysts, automatically Aug 1, 2019 Oct 1, 2019
Advertisements

Dynamics 365 2019 release wave 2

Dynamics 365 Business Central: 2019 release wave 2 plan

The first Insider Builds for the Business Central 2019 release wave 2 just became available.

Features that are planned to release from October 2019 through March 2020.

For more information about the above-mentioned features, see the 2019 release wave 2 plan here.

This is also the very first Insider Build that does not include the Windows client (Dynamics NAV client connected to Business Central) as announced earlier.

More features will be unlocked soon along with more information for each one of them.

Dynamics 365 Business Central provides a complete business application solution designed and optimized for SMB organizations. Since its launch in April 2018, Dynamics 365 Business Central has seen increasing adoption by organizations looking to digitally transform their businesses. In the October ’18 update, we updated Business Central to include on-premises deployments as well. The latest version, the April ’19 update, brought an update to Business Central that improves the productivity of users.

The independent software vendor (ISV) ecosystem is important for customers who want vertical or horizontal solutions for Business Central. We will accelerate this ISV ecosystem to begin moving new and existing customers to Business Central online. To achieve that goal, the following development pillars define the 2019 release wave 2 update:

Service fundamentals: Laser focus on performance, reliability, supportability, and security is essential to ensure that service quality remains ahead of the growth in service usage. Accessibility, already in a strong position, must be preserved.

Modern client: With the 2019 release wave 2, users access Business Central in the browser, Windows 10 desktop app, mobile apps on Android and iOS, or in Outlook. We accelerate our investment in speed and productivity features for the modern browser experience, achieving a major milestone in its transformation into a world-class desktop experience for new and expert users alike. 2019 release wave 2 is the first version that does not include the Dynamics NAV Client connected to Business Central (also known as the Windows client). The modern clients now support so many productivity features that the Windows client is discontinued for Business Central going forward. The legacy Dynamics NAV client remains supported in the April ’19 update and earlier versions in alignment with the support lifecycle.

Modern developer tools: the 2019 release wave 2 is the first version that does not include the classic development environment (also known as C/SIDE). The modern developer experience based on Visual Studio Code with Azure DevOps, and an AL language that supports an extension-based approach to customization now supports developing large apps such as the base application from Microsoft, and so C/SIDE is discontinued for Business Central going forward. The classic development environment remains supported in the April ’19 update and earlier versions in alignment with the support lifecycle.

Empower ISV acceleration: The 2019 release wave 2 update delivers a set of features designed to simplify ISV development for new solutions and, specifically, for streamlining the migration from the source code customization model of Dynamics NAV to Business Central. The Dynamics NAV business has been driven by strong vertical ISV solutions, surrounded by add-on solutions. For the 2019 release wave 2 update, our focus will be streamlining the path for ISVs to bring their solutions—and in turn their customers—to Business Central online.

Customer migration tools: After enabling Dynamics NAV ISVs to bring their solutions to Business Central online, the next step is to simplify the journey for existing Dynamics SMB customers coming from Dynamics NAV, Dynamics GP, or Dynamics SL to migrate from their current on-premises solutions to Business Central online. A set of tools already exists; these will be enhanced with the 2019 release wave 2.

Limited extension to the Business Central online localizations is planned for the 2019 release wave 2 in order to prioritize the service fundamentals work ahead of expanding the service footprint. Additional partner-developed localizations will be added following the 2019 release wave 2.

Download the 2019 release wave 2 PDF

New for wave 2: The Power Platform (PowerApps, Microsoft Flow, and Power BI) features coming in the 2019 release wave 2 have been summarized in a separate release plan.

Wave2ReleaseDates

Dynamics 365: 2019 release wave 2 plan

The 2019 release wave 2 enhances artificial intelligence capabilities to help organizations accelerate their transformation of customer service, sales, and marketing functions:

Sales Insights empowers teams with more foresight, to enhance productivity and better anticipate outcomes across the sales lifecycle.

Customer Service Insights provides an actionable view into critical performance metrics, operational data, and emerging trends using industry-leading artificial intelligence.

Virtual Agent for Customer Service enables organizations to create AI-powered bots that chat with customers and provides new opportunities for organizations to improve customer service through digital transformation.

Customer Insights enables every organization to unify and understand their customer data to harness it for intelligent insights and actions.

Market Insights enables business users to gather actionable insights based on what consumers say, seek, and feel about their brands and products.

Fraud Protection enables the e-commerce merchants to drive down fraud loss, increase bank acceptance rates to yield higher revenue, and improve the online shopping experience.

The 2019 release wave 2 continues to add a whole new set of experiences to enhance employee productivity using mixed reality:

Remote Assist empowers technicians to solve problems faster the first time.

Layout provides a new way for space planners to bring designs from concept to completion with confidence and speed.

Product Visualize empowers salespeople to convey the true potential of their products to their customers by harnessing the power of augmented reality on their mobile devices.

Guides is a mixed-reality application for Microsoft HoloLens that enables employees to learn in the flow of work by providing holographic instructions when and where they need them.

Power Platform: 2019 release wave 2 plan

The Microsoft Power Platform enables users and organizations to analyze, act, and automate on the data to digitally transform their businesses. The Power Platform today is comprised of three products – Power BI, PowerApps, and Flow.

For PowerApps, this release wave includes major improvements to enable app makers to build higher-quality apps more easily while still supporting more advanced enterprise and administrator requirements. Improvements in PowerApps focus not only on introducing capabilities but also on simplifying existing concepts to improve maker and end-user productivity in PowerApps and Dynamics 365 apps built upon the Unified Interface.

PowerApps makers can now create a powerful new type of experience called PowerApps Portals, which are web portals that surface data stored in Common Data Service to employees or users outside their organizations.

Microsoft Flow is introducing smarter and more powerful experiences in three key areas. Flow makers get smarter and more powerful experiences. End users of flows can leverage world-class business process capabilities, including working with business processes offline. Finally, there is now much richer tooling for administrators, such as PowerShell cmdlets and the new Power Platform Admin center.

AI Builder (preview) is a brand-new Power Platform capability for teams with the business expertise to easily automate processes and predict outcomes to improve business performance. AI Builder is a turnkey solution that brings the power of Microsoft AI through a point-and-click experience and is directly integrated into PowerApps and Microsoft Flow.

Power BI simplifies how organizations derive insights from transactional and observational data. It helps organizations create a data culture where employees can make decisions based on facts, not opinions. For the upcoming release, Power BI is investing in four key areas that drive a data culture: intuitive experiences, a unified BI platform, big data analytics, and pervasive artificial intelligence (AI).

Data integration provides built-in connectivity to the Power Platform and more, with data across hundreds of business systems, enabling rich and intelligent experiences. The Common Data Model provides semantic consistency for canonical business entities across Dynamics 365 and Common Data Service, increasing value and saving time for application developers, ISV partners, and integrators.

This release plan describes functionality that may not have been released yet. Delivery timelines and projected functionality may change or may not ship (see Microsoft policy).

Here are the key dates for the 2019 release wave 2.

Milestone Date Description
Release plans available June 10, 2019 Learn about the new capabilities coming in the 2019 release wave 2 (October 2019 – March 2020) across Dynamics 365 and the Power Platform.
Release plans available in additional 11 languages July 8, 2019 The Dynamics 365 and Power Platform release plans are published in Danish, Dutch, Finnish, French, German, Italian, Japanese, Norwegian, Portuguese (Brazilian), Spanish, and Swedish.
Early access available August 2, 2019 Try and validate the new features and capabilities that will be a part of the 2019 release wave 2, October update, before they get enabled automatically for your end-users.
General availability October 1, 2019 Production deployment for the 2019 release wave 2 begins. Specific deployment dates for each country or region or instance will be communicated in advance.

Web Services – Business Central Part- 1

You can use web services in Microsoft Dynamics 365 Business Central to expose data to the outside world.

You can use web services to get data from Microsoft Dynamics 365 Business Central and use it in other applications.

Any application, programing language or program that can work with XML and/or JSON for example: – Power BI, Microsoft PowerApps, a custom .NET program, etc. can connect to Microsoft Dynamics 365 Business Central fetch the available data.

A web service can also be used to create new or update existing data in the application.

Both XML (Extensible Markup Language) and JSON (JavaScript Object Notation) are open-standard file formats that are readable by humans. They are used to send information between clients over web services.

In this post we will discuss some terminology and differences between SOAP and OData. We will also learn on how to configure these services in Microsoft Dynamics 365 Business Central.

SOAP relies on HTTP(S), SMTP, FTP for message negotiation and transmission.

The most common type of messaging pattern in SOAP is the Remote Procedure Call (RPC), where one network node (the client) sends a request message to another node (the server), and the server sends a response message to the client. It uses SOAP envelope, which defines the message structure and how to process it.

A SOAP service exposes a WSDL (Web Services Description Language) file that describes how the service can be called, what parameters it expects and what data structure it returns. This file is an XML based document, and is targeted to be read by machines, not by humans.

OData (Open Data Protocol) is an open protocol that is designed to use and query RESTful APIs. An API (Application Programming Interface) is a set of routines and protocols that is used to communicate between different software components.

OData is built upon REST services and can be used to query REST services. By providing extra query parameters to a URL, you can for example limit or filter the result set.

SOAP exposes a WSDL document, OData exposes an EDMX document, which contains metadata for all the published web services.

You can see all the available OData web services by going to the search box and search for web services.  This page is used to enable access to OData and SOAP web services.

ws-001

OData web services can only be used with object types pages and queries, not with codeunits.  There are two versions of OData you can use, version 3 and version 4.  Version 4 is an enhanced version, and important to know is that version 4 returns JSON where version 3 returns AtomPub documents which are XML documents.

From this window you can add new or manage existing Web Services.

It is simple 2 Step task Add new object give service name and enable Publish checkbox. You will get your OData and/or SOAP URL.

For example: – object type page can be used in OData and in SOAP web services.

Let us explore the Web-Service Urls. For test purpose, I have created a Service with the name Customers for Page Customer Card.

https://ksd-Desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers

When we open, for example, our Customers web service, we can have a look at the URL.

First we have our server name and the port it’s using.  “https://ksd-Desktop:7748”

Then we have our instance name, which in our case is BC130.

Then our OData version, so version 4.  “ODataV4”

And then our company name, “Cronus International Ltd”.

And then finally our web service name, which is, in our case, “Customers”.

Let’s try this url, when we execute this url in our browser we get json file listing customers similar to below:

WS-003.jpg

Here etag is the unique identifier of each records, it will be required when you update records, will discuss later.

If I remove my service name then:

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)

{“@odata.context”:”https://ksd-desktop:7748/BC130/ODataV4/$metadata#Company/$entity”,”Name”:”CRONUS International Ltd.”,”Evaluation_Company”:false,”Display_Name”:”CRONUS International Ltd.”,”Id”:”ab76c7b4-3c72-4805-86f7-7d91a10612ce”,”Business_Profile_Id”:””}

If I remove my Company Name then:

https://ksd-desktop:7748/BC130/ODataV4/

WS-004.jpg

If I open the metadata url

https://ksd-desktop:7748/BC130/ODataV4/$metadata

You will get EDMX file which shows metadata about the information in the OData web service.

ws-002

You can see some properties with our data types.  For example, if we scroll down, if we go to Customers, we have our entity type Customers, we can see some properties which our data types and max lengths.  We can also see what properties are primary key.  So this is number and so on.  So all useful information when you’re creating applications that use these OData web services.

Filtering the OData

You can set filter expression to the url few examples as below:

We will use the filter option top for limiting the result to top 5 records of customer.

After our service name, we type question mark, then the dollar sign, and then the word top equals 5.

For example :

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers?$top=5

Now the query will result in only first 5 records for customer.

If we want to see next 5 records then we can append &$skip=5 on above url

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers?$top=5&$skip=5

If you want to see specific customer you can modify url as:

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers(‘10000’)

Please refer to EDMX file to find correct name of the fields if wants to filter on specific fields.

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers(‘10000’)?$select=Name

You will get the result as below for above url query

“@odata.context”:”https://ksd-desktop:7748/BC130/ODataV4/$metadata#Company(‘CRONUS%20International%20Ltd.’)/Customers/$entity”,”@odata.etag”:”W/\”JzQ0O044eFNmcWdXV0NpYlhTZDhUdTlrdytZUmdQbWRkL2U4TzZ4UEsxNGtod0

E9MTswMDsn\””,”Name”:”The Cannon Group PLC”}

You can add other fields too by appending the url with ‘,’

Customers(‘10000’)?$select=Name,City,Address……………

As told earlier please refer to EDMX file for correct Fields Name or Property it is case sensitive.

You can remove the Primary Key from the url to get list of selected fields for all customers.

Customers?$select=Name,City,Address……………

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers?$orderby=City&$select=Name,City,Address

You can use orderby to sort the data from other than Primary key, by default it is sorted by Primary Key.

You can use desc for descending sort.

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers?$orderby=City desc&$select=Name,City,Address

You can use filter to filter specific field values as:

https://ksd-desktop:7748/BC130/ODataV4/Company(‘CRONUS%20International%20Ltd.’)/Customers?$filter=City eq ‘Zutphen’ or City eq ‘Atlanta’&$select=Name,City,Address

you will get output as:

WS-005.jpg

You can use expressions like [filter=Balance_LCY gt 0] or [filter=Location_Filter eq ‘BLUE’] etc.

I stop here for today. We have seen how the Web Services OData can be used to query records.

We will discuss about other stuffs in our next post in more details.

Till then keep exploring and learning, see you in next post. Take Care of yourself.

 

Automated Testing in Business Central

Testing is the essential part of the software development process and Cover User Scenarios.

Developers take care of their unit tests and perhaps, some wider coverage when they deliver a finished module. When developer tests the software he only tests scenarios for which he have done development.

In manual testing, since there are usually only humans involved, there will without doubt be discrepancies in the burden that test are conducted. There’s is always the trade-off between whether or not to conduct a full test scenarios for every delivery. In most scenarios tests are performed to areas of application, those are relevant for the current release. Like why should you repeat the purchasing scenarios if you only made a change to the sales process for example?

Automated testing brings a level of insistency and repeatability to testing that is impossible to achieve with just humans. By using a tool that facilitates automated testing, you can run as many test, as many times, as you want with a guarantee that each and every test will run exactly the same way as the first time. You can actually prove that a change in the sales process will not affect the purchasing process.

The key to successful automated testing is that you can link test scenarios to user scenarios. To make your development process itself test-based, by writing proper test at the start of the development process will give you clear and concrete requirements that the software has to meet.

Repeatability of running test scenarios is another key ingredient of automated testing. Manual testing can be very tedious task that can cause a human tester to lose focus. Added project pressure can add to the temptation for tester to skip the unimportant pieces of the test scenarios. How many times do you have to make sure that you can’t enter text string in an amount field for example?

Automated testing is a predefined set of Instructions that always run, no matter what time, no matter how eager the project manager wants the results, no matter how hungry you are, the test scenario is defined and it will execute every instruction every time that the test runs.

It will run exactly the same manner each and every time. You can spin as many sessions you need and simulate real load test. You can potentially scale this up to hundreds or even thousands of users at the same time and really test the limits of your software’s capabilities. Even in larger organizations it will never be possible in a manual test situation.

Manual testing is great to prove that a new piece of software meets the requirements. But what is not always clear is whether a new change in the software has had any adverse effects on existing functionality in other areas. Whereas in case of automated testing provides the capability to prove that all test scenarios can still give you the same test results over time, whenever you make any changes to any part of the software. Since you can schedule automated tests, you can run a full system test overnight or weekend, when you come back at your desk in the next morning you can look at the outcome of the latest test run and focus on just the ones that failed.

Test that are included in the standard business central test toolkit, cover the entire application. You can run the full length of thousands of those test in a matter of hours. So, combined with a build script, you can automate the creation of a new tenant, implement your compiled app, run selected tests and then, evaluate the results in a fraction of the time, which it would take a team of manual testers to do the same thing in hours. Automated testing provides the capability to run a full test set every single day or multiple times a day. If you have that capability, why not use it?

You can organize your development process to include daily build process and include a full sweep of the entire set of tests, and almost guarantee a 100 percent success when you are ready to deliver your software.

Those working on AppSource apps, will not have a choice on matter. Automated testing is mandatory for your app source submission.

Conclusion best way to do testing will be take a fresh demo database of BC, install your app and test the user scenario. If you need to prepare any data is necessary to successfully complete the user scenarios or the test scenarios, the creation of that data should be part of the installation process of your app, and or your test app. Most important feature should be included is the ability to run them in a non-super role, it should not be mandatory to have super rights in order to use your app. Make sure you include the test for non-super users as well.

Oh!! Today lots of lecture. Let’s see how we can implement this, although writing test scripts is not a easy task, require lots of efforts to cover all scenarios and knowing the system well in advance, with clear set of inputs and outputs, else even you pass test scenario chances to fail in real word cannot be avoided.

Below are the steps we follow to create an automated test script. Below is not the full and final, it is just an idea how we can implement this, rest you have to use your experience and skills to complete as per your requirement and project need.

Not compulsory but it will be better if we can use fresh database for this task. We will have only our Extension on which we are going to run this Automated Test and the Extension which we are creating in this post for Auto Test.

Step – 1 : Nav/BC Preparation

If not already imported you need to import Set of objects to enable automated testing. You can find them on installation disk under TestToolKit folder.

tcu001

If creating a Docker Container use option –includeTestToolkit in the new NavContainer Cmdlet.

Once you are done now you can run your Test Tool

tcu002

tcu003

Hold on, we will come to this later in below post.

Step – 2 : VS Code Project Preparation

Create a New project, and add Folder Structure to arrange your files.

You can find steps in this post : Bare Minimum Steps to Start with fresh Extension Project for Business Central

We need to Specify test target as a dependency. For this it is compulsory to have the apps symbols file to make this work. Install your Extension on this database if not already deployed.

We need to import symbols for the Test Framework as well. So need to specify ‘test’ settings to the app.json file of this project. Specify minimum supported value e.g. 12.0.0.0

Once these two settings are done, now when you hit Download Symbols it will include the Symbols for your Extension and Test Toolkit Objects.

tcu004

Now you can see 2 additional package symbol files are downloaded.

  1. KSD Consultancy_MyFirstExtensionProject_1.0.0.0.app
  2. Microsoft_Test_13.0.24209.0.app

And 2 std. symbol file that gets included when you create any new Extension Project.

Step – 3 : Writing Test Codeunits

We will create a codeunit of Subtype = ‘Test

Test procedures are decorated with [Test] attribute

Your OnRun will execute first, followed by other all test procedures.

You can use [TransactionModel] attribute to specify each test procedure is in a separate database transaction.

The output will be Success or Failure.

Failure is any error that is raised by the test code or from the code which is being tested. In either case Other Test procedures will still continue.

Other Features are Test Pages and UI Handlers, we will discuss on same in some other similar post.

AssertError statement is like if I do this error should come, it happens then your test is Success. In this case Failure is actually Success as you knowingly created error.

As I told earlier also this is very complicated area, to write Test Scripts, but if you start practicing from small stuffs eventually you will learn and will able to write a good Test Scripts. You can check out other standard Test Codeunits and update your knowledge how you can write your own Test Scripts.

My sample Test Codeunit looks something like below, it is just for idea in real scenario there should be lots more.

tcu005

Step – 4 : Deploy & Run the Test App

Publish your Test App.

Go to Extension Management

tcu006

You will find 2 Extension, The Initial Extension which we created in earlier posts and the Extension we just deployed.

Now open the Test Toolkit Page – 130401

Click on Get Test Codeunits function then Select Test Codeunits

tcu007

Now Select the Codeunit we just created.

tcu008

You can select other Codeunits as per the requirement, in my case I am just going to select my Codeunit which we created in this post.

tcu009

This will list all the functions available in the Test Codeunit.

Now you can select Run all or Run Selected. To test your App, I will select Run All.

tcu010

Here is the final output of test result

tcu011

Hope you will agree the test we performed, same if done manually no one can test the same in 6 seconds as this did. And we can perform as many times, and any time.

Once your Test Codeunit in place whenever you make changes to app, you can just run the test and verify that any changes you made have not impacted the existing functionality in any manner.

To save the time in testing, you have to pay in other way in creating the test codeunit as it is not that easy to cover every user scenario in your test codeunit and will require lots of efforts.

But when you are working for App Source you have no choice, you will have to do it.

Today the post got bit longer, but this topic is very complicated and require explanation. Hope you got the starting point from this and will put your efforts to reach to your required conclusion, take help of existing codeunit, nothing will be better than those to learn how Microsoft themselves implements it.

See you again with some more topics, and if get some extra time will try to add more to this post as a second part to this post. Fact is one post is not sufficient for such a huge topic.

Till then keep exploring and learning and take care of yourself.

AL Basics – Part-1

Programming in AL is very easy, just we need to make up our mind to accept the changes. Till we resist to changes it seems to be hard once we accept it, that becomes easy.

In VS Code, for AL it provides Snippets which help you with creating your base structure following which you can easy build up your complex coding structures.

Few Snippets ready to use are as below:

To Create Structure of Snippet to use
Table ttable
Page tpage
Codeunit tcodeunit
Page Extension tpageext
Table Extension ttableext
Table Field tfield
Page Field tfieldpage
Trigger ttriger
Functions/Procedure tprocedure
Assert error tassert
With Do twithdo
If tif
If Else tifelse
Case of tcaseof
Case else tcaseelse
For tfor
While twhile
Repeat Until trepeat

Today I will explain on conditional and loop statements for others I will do in next post.

These statements are similar as we are familiar with using in our C/AL.

Below are few examples to explain them, since no changes so need not commentary for same.

conditional StatementsLoop Statements

For other Snippets will come in next post.

Quick Start with Extensions for Business Central

Today I am going to give you a tip for getting started with Extension Building for Business Central.

As AL have newly introduced so it is going to take time to learn and be comfortable with programming using AL codes.

Best way of learning anything is learning by examples. What if we first learn what will be equivalent to actions we perform in Navision designer.

So to demonstrate this I will start with creating a small customization directly in Navision then convert it to Extension.

Are you ready? Let’s start with this exciting journey of 1-2-3 step.

Step 1.

Saving my Base Line Object (Prior to performing any Modification).

In this example I am going to Modify Table – Item & Page Item Card.

Let’s export this two object as FOB, Later we will require this to revert our customization.

Also export this two objects as txt. This we will require in our Extension building process. But need to follow instructions explained in below step, else this file will be rejected by the tool when we try to convert to AL. Follow the process of exporting text file explained after completing the Customizations in Step 3.

Step 2.

I will create one Table 50000 – Product Range as below:

1

Next I will create one List Page on above Table, Page 50000 – Product Range as below:

2

Also will Add Table Property as below to enable Lookup & DrillDown

3

Save your objects.

Now I will add one field to Table Item & Page Item Card as below:

4

5

Now I am done with my all customization and saved my modified & New Objects.

Step 3.

Now we will export these objects All New & Modified into Text File.

But we will not do it from Object designer rather will do it from command prompt.

Preparing for AL Conversion.

Run Command Prompt as Administrator.

Change to RTC folder.

6

Check your folder where you have installed, default location is as one I am using.

You can export all objects in one single file or one file per object. I am exporting one object per file, you can explore command parameter to use accordingly.

I will be using below commands.

First we will create 4 Folders namely Original, Modified, Delta & Result

Note: Make sure ExportToNewSyntax with command parameter is used else txt2al (which we will use below) will reject your files, it is mandatory.

Below command is to export Original objects before modification: (Save in Original Folder)

1. finsql.exe Command=ExportToNewSyntax, File=G:\RND\Txt2ALTest\exportedBaselineObjectsT27.txt, Database=”Demo Database NAV (13-0)”, ServerName=”KSD-DESKTOP” ,Filter=Type=table;ID=27

2. finsql.exe Command=ExportToNewSyntax, File=G:\RND\Txt2ALTest\exportedBaselineObjectsP30.txt, Database=”Demo Database NAV (13-0)”, ServerName=”KSD-DESKTOP” ,Filter=Type=page;ID=30

Below command is for New Objects: (Save in Modified Folder)

3. finsql.exe Command=ExportToNewSyntax, File=G:\RND\Txt2ALTest\exportedNewObjectsT50000.txt, Database=”Demo Database NAV (13-0)”, ServerName=”KSD-DESKTOP” ,Filter=Type=table;ID=50000

4. finsql.exe Command=ExportToNewSyntax, File=G:\RND\Txt2ALTest\exportedNewObjectsP50000.txt, Database=”Demo Database NAV (13-0)”, ServerName=”KSD-DESKTOP” ,Filter=Type=page;ID=50000

Below command is for Modified Objects: (Save in Modified Folder)

5. finsql.exe Command=ExportToNewSyntax, File=G:\RND\Txt2ALTest\exportedModifiedObjectsT27.txt, Database=”Demo Database NAV (13-0)”, ServerName=”KSD-DESKTOP” ,Filter=Type=table;ID=27

6. finsql.exe Command=ExportToNewSyntax, File=G:\RND\Txt2ALTest\exportedModifiedObjectsP30.txt, Database=”Demo Database NAV (13-0)”, ServerName=”KSD-DESKTOP” ,Filter=Type=page;ID=30

Our Next step will be to create DELTA files.

Open Business Central Administration Shell

Import your Microsoft.Dynamics.Nav.Model.Tools Module using below syntax

import-module “C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\130\RoleTailored Client\Microsoft.Dynamics.Nav.Model.Tools.psd1” -force –verb

Execute below Shell Command:

Compare-NAVApplicationObject -OriginalPath G:\RND\Txt2ALTest\Original\*.txt -ModifiedPath G:\RND\Txt2ALTest\Modified\*.txt -DeltaPath G:\RND\Txt2ALTest\DELTA\ -ExportToNewSyntax

7

After this process we will get our Delta files in Delta Folder, this will be input to our next command/tool.

Next we will convert Delta File to AL files.

On Command prompt used above run below command: (This is not Shell Window please make sure)

txt2al –source G:\RND\Txt2ALTest\DELTA\ –target G:\RND\Txt2ALTest\RESULT\

8

Here we will get our *.al files. Which will be used for creating extensions.

Step 4.

Perform clean up to the database.

  1. Import the FOB exported in Step one to restore your original Table 27 & Page 30.
  2. Delete New Created Objects.

Now our database in in original state as before performing customization.

Fresh and Clean Business Central Database without any customizations.

Step 5.

In this step we will create extension in VS Code using above obtained *.al file.

Open VS Code and Press <Ctrl>+<Shift>+<P> and select AL:Go! to create a project Folder

9

Enter your Project Folder and press enter

10

Update your app.json file as below:

Add Name & Publisher, also check available idRange all objects in this project must be in this Range.

11

Update your launch.json file with your server & authentication details accordingly:

12

Remove the HelloWorld.al file created by default by right click and select delete.

Now add your created *.al files

13

You can drag and Drop to your Project Folder.

Now you will get errors, to resolve it we need to download our Symbols from Navision.

To download press <Ctrl>+<Shift>+<P> to open command Pallet and select Al: Download Symbols

14

If your server settings in launch.jason is correct your Symbols will get downloaded.

15

Now let resolve any others errors that may have in your *.al Files.

First I will rename my all Files to meaningful name so that in future it is easy to manage.

To do so, right click the File and select Rename, in my case I have renamed as below:

16

Now we will open each file and perform required action to resolve the errors as below.

After changes don’t forget to save your files.

17

18

19

20

Ensure Object ID you use is within the range of id provided in app.json file. ID is not used in database or any other extensions. Else when you deploy the extension it will give errors, also make sure you give unique object names too.

DataClassification property is not available in Al so we removed it.

Now my all objects are error free, and ready to be packaged.

Step 6.

Now we will Deploy & Test our Extension.

To create a package press <Ctrl>+<Shift>+<P> to open command pallet.

21

You can choose AL:Publish also it will create package and Publish to the server.

Next you choose AL:Publish to deploy your Extension to the Business Central.

You can verify your Extension from Extension Management Page from Navision Client

22

Double click on your extension record to see details:

23

Now let’s see in action our extension.

Open Item Card.

24

Congrats, your First Extension is ready to use.

There is lots of many thing to explain, but in single post everything is not possible. I will come up with basic things and creating Extensions from scratch in some other posts.

It was just a quick idea, as everyone is looking option for upgrade so this information may be handy to plan their next move.

We will learn basics of AL and other fundamental things in our upcoming posts.

Before I close this post will like to share few more details to complete this post.

If you check your Navision you will not find any object or additional fields we added in our extension, then where is my data stored?

Let’s have look in SQL.

25

Item Extension & Product Group table is created with your app id of the extension.

We will discuss in more details about other things in details in our next upcoming posts.

Till then keep learning, and stay safe, take care.

 

Image Analysis feature in Dynamics NAV 2018

In Dynamics NAV 2018, the Image Analyzer extension uses the Computer Vision API to analyze images that are attached to contact persons and items.

For example, this is useful for items because it lets you build up a stockpile of metadata about what you sell and use it to fine-tune search results when someone is browsing your web shop.

Image Analyzer is free in Dynamics NAV, but there is a limit to the number of items that you can analyze during a certain period of time. By default, you can analyze 100 images per month.

After you enable the extension, Image Analyzer runs each time you import an image to an item or contact person. You will see the attributes, confidence level, and details right away, and can decide what to do with each attribute. If you imported images before you enabled the Image Analyzer extension, you must go to the item or contact cards and choose the Analyze Picture action.

Requirements

There are a few requirements for the images:

  • Image formats: JPEG, PNG, GIF, BMP
  • Maximum file size: Less than 4 MB
  • Image dimensions: Greater than 50 x 50 pixels

How to enable Image Analyzer

To enable the Image Analyzer extension, do one of the following:

Method-1 : Open an item or contact card. In the notification bar, choose Analyze Images, and then follow the steps in the assisted setup guide.

 

IA-1

This will launch Image Analyser assisted setup guide, follow the step.

 

IA-2

IA-3

IA-4

Once you are done It will import your image for Analysing.

IA-5

 

Method-2 : Access the Service Connections, and then choose Image Analysis Setup.

IA-5.1

Choose the Enable Image Analyzer check box, and then complete the steps in the assisted setup guide.

IA-5.2

For URL and Key follow these steps:

Click on Computer Vision API Documentation

IA-6

Click on Try Computer Vision API

IA-7

Select your API Computer Vision API and then Get API Key

IA-8

Agree to T & C select your Country/Region and then Next

IA-9

Sign-In with the preferred account sign-in method

IA-10

Once done you will land on page which will have your Endpoint URL and Key

You must add /analyze at the end of the API URI, if it isn’t already there.

IA-11

Enter your Endpoint URL and Key and close the window.

IA-12

Now you import your Image, or select Analyze Picture if already imported

IA-13

This will analyze the Image and provide you with the Attributes.

The Image Analyzer Attributes page displays the detected attributes, the confidence level, and other details about the attribute. Use the Action to perform options to specify what to do with the attribute.

 

This is how you enable and configure your Image Analyzer Service.

 

To see how many analyses you have left in the current period

You can view the number of analyses you’ve done, and how many you can still do, in the current period.

Enter Image Analyzer Setup, and then choose the related link.

The Limit type, Limit value, and Analyzes performed provide the usage information.

 

To stop using the Image Analyzer extension

Enter Service Connections, and then choose Image Analyzer Setup.

Clear the Enable Image Analyzer check box.

 

I will come with more details as I proceed.

 

 

 

NAV Development Preview – Modern Development Tools for Dynamics NAV

Dear friends, after writing blog on Modern Development Tools for Dynamics NAV few of my readers requested to compile all information related to this in single blog.

Here are the links related to these posts, not all are my but are useful and will help keep you updated on same.

Extensions 2.0

Configuring Visual Studio Code

Below are the helpful other links from Microsoft Dynamics NAV Team

How do I learn more?

Check out these docs:

Tools overview

Getting Started guide

Object overview and AL language changes

Modern Development Tools Updates

released from launch till Dec 2017

Modern Development Tools for Dynamics NAV

NAV Development Tools Preview – January Update

NAV Development Tools Preview – February Update

NAV Development Tools Preview – March Update

NAV Development Tools Preview – April Update

NAV Development Tools Preview – June Update

NAV Development Tools Preview – July Update

NAV Development Tools Preview – August Update

NAV Development Tools Preview – September Update

NAV Development Tools Preview – October Update

NAV Development Tools Preview – November Update

NAV Development Tools Preview – December Update

Hope you find this information useful in understanding and learning the new Modern Development Tool for Dynamics NAV 2018.

 

 

 

 

 

 

 

Extensions 2.0 – Dynamics Navision 2018

The issue with customizations is that they often introduce challenges when upgrading. It’s hard to upgrade a solution from one version to the next when changes have been made to the underlying solution. Extensions, and the new version – Extensions 2.0 – solves this problem.

Instead of defining customizations in the original source code, extensions are written alongside the solution source, where the integration with the source is handled with events. An extension can add new objects and extend existing objects that are present in the solution. The extension code is packaged in a file, which you can deploy to your solution. This allows us to upgrade the underlying solution and, as long as the events remain, the extension will behave in the same way from version to version.

To help you developing solutions for this new programming pattern, you can use the new developer tools to build, test, and deploy extensions.

 

In app designer

In the client, you can switch to the in app designer mode that provides a way for you change the look and feel of the client easily and quickly. In short, the in-client designer lets you define what elements (such as fields, groups) appear on a page and how they are arranged. The in-client designer also provides an interactive way to create extensions based on changes you make in the client. Some of the features include:

  • Adding a field from the source table to a page.
  • Moving a field to another place on a page.
  • Removing a field from a page.
  • Previewing your design in desktop, tablet, and phone clients.
  • Saving the changes for the tenant or saving as an extension package file in Visual Studio Code.
  • Changing the caption of a fields on the page.
  • Adding, moving, renaming, and removing an action.
  • Adding, moving, and removing page parts.
  • Adding new pages.

 

Personal and organizational design changes

As an end user, changes can be applied so that only the user who made the changes will see them. This enables users to personalize the pages for their role. Examples of personalization could include moving important fields to a more prominent position on the page, or renaming a date field so that it is clearer which field is the ship date versus the expected arrival date. Alternatively, as an administrator, changes can be made globally, so that everyone in the organization can see them.

Business consultants can also access the same tools to help customers make changes to their solution, resulting in improvements in productivity for all users. For example, they could add new actions to run custom reports, or introduce entirely new pages or page parts.

 

Working with the In App Designer

To turn on the In-App Designer, start the client as normal, and then simply choose the In-App designer icon in the ribbon on any page in the client.

 

ExtV2-1

The Design mode bar appears at the top page, indicating that the in-client designer is active. You can now open any page, and start making changes.

ExtV2-2

Choose More to display additional design options, such as adding a field, creating a new field, and changing the preview to another client type.

ExtV2-3

 

ExtV2-4

To move a field, click and hold the handle in the field to drag and drop it from its current position to the new location, as indicated by the horizontal line.

ExtV2-5

To remove a field, click the field’s handle, and then choose Remove.

ExtV2-6

To add a field, choose the Field button, and then drag and drop a field from the list that appears to the desired location.

ExtV2-7

To preview in another client type, simply choose one of the preview buttons.

When you are finished making changes, choose Stop Designing. You then have the option to save the changes to the tenant for all users, or to save the changes to a file that you can work on later in Visual Studio Code.

ExtV2-8

You can see that Extension is deployed on your solution, check as below.

ExtV2-9

Hope you will enjoy using this new feature of development.

Will come with more details as I proceed.

Configuring Visual Studio Code to Use Modern Development Environment with Dynamics NAV 2018

After installing Dynamics NAV 2018, I want to configure Visual Studio Code with Dynamics NAV to use new Development tool.

Before we start lets verify few things and update accordingly.

NDE-1

You can download VS Code from here:-Click to download Visual Studio Code

Install and Launch the Visual Studio Code.

Now Click View -> Extensions.

NDE-2

Click on … to open the extension menu.

Click on Install from VSIX

NDE-3

You can find VSIX file on the installation medium path:

“ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment”

or in the

“C:\Program Files (x86)\Microsoft Dynamics NAV\110\Modern Development Environment”

NDE-4

This will install AL Language Version 0.12.15355

NDE-5

Once the Extension installation is complete, follow below steps

Press Alt+A, Alt+L to trigger the Go! Command

NDE-6

Enter Project Name and Press Enter

NDE-7

Choose “Your own server”

Once you select the “Your own server” you will see a code like below in the “launch.json” file.

NDE-8

Update the information to look similar to below:-

NDE-9

I have updated my ServerInstance as DynamicsNAV110 (you check your instance name if changed while installing server)

I have updated my Authentication as Windows (I am using Windows authentication update what yours use accordingly)

I have added Port as 8049 (please check and use accordingly you are using the port, if using default 7049 then this step not required)

Now save your File. And Press <CTRL + F5>.

NDE-12

Enter your Credentials.

The server url and the web client url are assumed to be the same. That is not the case. The two settings we talked about above, the server url and the developer port number, are the only settings you need in the launch.json.

When VS Code publishes the extension to the NAV server, the NAV server returns the web client url as a response. This url is then opened in the browser. No setting needed in the launch.json at all.

The NAV server reads that setting from the Web Client Base Url server setting.

NDE-13

NDE-11

Your Extension is published, you can verify as below:

NDE-10

Now you are good to go with developing your Extensions using New Modern Development Tool using AL.

I hope this may have clarified your doubt on how VS Code and the NAV server work together!

I will come with more details as I proceed.

Previous Older Entries

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: