Microsoft Dynamics 365 Business Central Cookbook
eBook - ePub

Microsoft Dynamics 365 Business Central Cookbook

Effective recipes for developing and deploying applications with Dynamics 365 Business Central

  1. 380 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Microsoft Dynamics 365 Business Central Cookbook

Effective recipes for developing and deploying applications with Dynamics 365 Business Central

About this book

Gain useful insights to help you efficiently build, test, and migrate customized solutions on Business Central cloud and on-premise platforms

Key Features

  • Explore enhanced functionalities and development best practices in Business Central
  • Develop powerful Business Central projects using the AL language
  • Master the new Business Central with easy-to-follow recipes

Book Description

Microsoft Dynamics 365 Business Central is a complete business management solution that can help you streamline business processes, connect individual departments in your company, and enhance customer interactions.

Ok. That first part was really professional sounding, right? Now, let's get into what this cookbook is going to do for you: put simply, it's going to help you get things done. This book will help you get to grips with the latest development features and tools for building applications using Business Central. You'll find recipes that will guide you in developing and testing applications that can be deployed to the cloud or on-premises. For the old-schoolers out there, you'll also learn how to take your existing Dynamics NAV customizations and move them to the new AL language platform.

Also, if you haven't figured it out already, we're going to be using very normal language throughout the book to keep things light. After all, developing applications is fun, so why not have fun learning as well!

What you will learn

  • Build and deploy Business Central applications
  • Use the cloud or local sandbox for application development
  • Customize and extend your base Business Central application
  • Create external applications that connect to Business Central
  • Create automated tests and debug your applications
  • Connect to external web services from Business Central

Who this book is for

This book is for Dynamics developers and administrators who want to become efficient in developing and deploying applications in Business Central. Basic knowledge and understanding of Dynamics application development and administration is assumed.

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Year
2019
Print ISBN
9781789958546
Edition
1
eBook ISBN
9781789958881

Business Central for All

Alright, now we're getting into one of my favorite sections of the book! In this chapter, we're going to take a look at some of the ways that we can interact with Business Central from outside of Business Central. First, we'll look at how web services can be published in Business Central, which is critical for surfacing data to external applications and services. Next, we'll move on to one of the newest platforms available in Business Central, the Business Central API. This is a new RESTful web service platform that will allow you to consume and create data in Business Central using standard API calls.
Moving on from the API, we get into the Power Platform. This super cool collection of Microsoft online services and applications puts a lot of...power...into your hands.
Once we finish with Power Platform, we'll look at Azure Functions. They provide us with a way to deploy serverless .NET applications to the cloud so that we can consume them in our Business Central applications. This is very important for those that need to leverage .NET libraries in the online Business Central environments.
In this chapter, we will cover the following recipes:
  • Consuming external web services
  • Publishing your own web service
  • Enabling basic authentication
  • Business Central API – exploring with Postman
  • Business Central API – retrieving data
  • Business Central API – creating data
  • Business Central API – publishing a custom endpoint
  • Power Platform – using Microsoft Power BI
  • Power Platform – using Microsoft Flow
  • Power Platform – using Microsoft PowerApps
  • Consuming Azure Functions

Technical requirements

For this chapter, you will need an AL development sandbox. It is recommended that you use an online Business Central sandbox for these recipes and, as such, the recipes in this chapter assume that setup. If you need help, then you can always refer to the Setting up your development sandbox recipe in Chapter 1, Let's Get the Basics Out of the Way, for information on how to set all of this up.
Code samples and scripts are available on GitHub. Some of the recipes in this chapter build on previous recipes. You can download the completed recipe code from https://github.com/PacktPublishing/Microsoft-Dynamics-365-Business-Central-Cookbook.
We're going to work with our old friend, the Television Show project, but I've made a few updates that we'll need for this chapter, so even if you've worked through all of the previous recipes to build the project, you need to download ch7/ch7-start.zip from the aforementioned GitHub repository. This file contains an updated Television Show project that you will need to use for the recipes in this chapter.
Extract the contents of ch7-start.zip and use them to overwrite the previous Television Show project files that you created.

Consuming external web services

One new feature that is native to the AL programming language is the ability to make web requests. Using new variable types, it's incredibly easy to connect to external endpoints to push and pull data between an external system and your Business Central application.
This recipe will show you how to connect to a RESTful API in order to retrieve JSON-formatted data.

Getting ready

You need to have your AL development sandbox ready to go. I'll mention it again, but it's recommended that you use a Business Central online sandbox for the recipes in this chapter. Any of the additional deployment types may require further setup and configuration that are beyond the scope of the recipe.
Make sure that you've downloaded ch7-start.zip and have extracted the contents to your machine, overwriting your existing Television Show project.
In this recipe, we're working with the scenario of achieving the ability to download episodic information about the episodes of a given television show.
To achieve this, we'll connect to a free API provided by TV Maze (https://www.tvmaze.com/api), and download the information to a new table named Television Show Episode. The information will be accessible from Television Show Card.
For the purposes of this recipe, the new objects have been created and hooked up. The only thing left to do is to create the function to connect to the API and download the television show episode data.

How to do it...

  1. In Visual Studio Code, open the televisionShow folder that you extracted from ch7-start.zip.
  2. In Explorer, select Download Episode Information.al.
  3. In the DownloadEpisodes() function, add the following local variables:
Client: HttpClient;
ResponseMessage: HttpResponseMessage;
JsonArray: JsonArray;
JsonToken: JsonToken;
JsonObject: JsonObject;
JsonContentText: Text;
Url: Text;
MissingIdErr: Label 'You must populat...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. Dedication
  4. About Packt
  5. Contributors
  6. Preface
  7. Let's Get the Basics out of the Way
  8. Customizing What's Already There
  9. Let's Go Beyond
  10. Testing and Debugging - You Just Gotta Do It
  11. Old School, Meet New School
  12. Making Your App Extensible
  13. Business Central for All
  14. DevOps - Don't Live without It
  15. Time to Share Your Application!
  16. Other Books You May Enjoy

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Microsoft Dynamics 365 Business Central Cookbook by Michael Glue in PDF and/or ePUB format, as well as other popular books in Computer Science & Bioinformatics. We have over 1.5 million books available in our catalogue for you to explore.