Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Microsoft Dynamics 365 Business Central

You're reading from   Mastering Microsoft Dynamics 365 Business Central The complete guide for designing and integrating advanced Business Central solutions

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630646
Length 684 pages
Edition 2nd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Stefano Demiliani Stefano Demiliani
Author Profile Icon Stefano Demiliani
Stefano Demiliani
Duilio Tacconi Duilio Tacconi
Author Profile Icon Duilio Tacconi
Duilio Tacconi
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Microsoft Dynamics 365 Business Central’s Online Momentum 2. Mastering a Modern Development Environment FREE CHAPTER 3. Extension Development Fundamentals 4. Developing a Customized Solution for Dynamics 365 Business Central 5. Writing Code for Extensibility 6. Advanced AL Development 7. Handling Files with Dynamics 365 Business Central 8. Report Development 9. Printing 10. Debugging 11. Telemetry 12. Coding for Performance 13. Dynamics 365 Business Central APIs 14. Extending Dynamics 365 Business Central with Azure Services 15. DevOps for Dynamics 365 Business Central 16. Dynamics 365 Business Central and Power Platform Integration 17. Useful and Proficient Tools for AL Developers 18. Creating Generative AI Solutions for Dynamics 365 Business Central 19. Other Books You May Enjoy
20. Index

GitHub Copilot for AL developers

In your daily practice, you have probably desired, at some point in time, to have someone other than the rubber duck on your desk to help you find out the right procedure or code snippet faster to finalize your code. GitHub Copilot could be your dream come true in assisting you while developing.

GitHub Copilot’s documentation and price plans (currently $10/month for individuals, $100 per year, and $19 per user per month for the Business edition) can be found at this web page: https://github.com/features/copilot and is available as a Visual Studio Code extension in the marketplace: https://marketplace.visualstudio.com/items?itemName=GitHub.copilot.

Figure 2.33: GitHub Copilot

Before installing GitHub Copilot, it is required to have a GitHub account. If you haven’t already got your own, you could easily create one at https://github.com/. This operation is free of charge.

Let’s enable the free trial together, step by step.

  1. Go to https://github.com/features/copilot and click on Start my free trial. NOTE: If you have not already signed in to your GitHub account, you will be prompted to do so.
  2. Give consent to the 30-day trial period.
  3. Add your payment details. NOTE: Remember to confirm or remove the payment details before the end of the trial period
  4. When prompted with GitHub Copilot can allow or block suggestions matching public code, choose Allow.

    When you apply for a trial version, it might take up to 30 minutes to process and synchronize your submission. You should wait for this time before moving forward with the next bullet point.

  1. Launch Visual Studio Code and go to Extensions (Ctrl + Shift + X)
  2. Search for GitHub Copilot and install it.
  3. Reload the Visual Studio Code window. You will be prompted to sign in (see below):

Figure 2.34: Signing in to GitHub Copilot

  1. Allow and grant all prompt requests to generate the appropriate token to interact and work with Copilot.

And that’s all. You should be ready to work together with Copilot right away. To be sure that Copilot is enabled, just check the small Copilot icon at the bottom right in the status bar:

Figure 2.35: GitHub Copilot icon

You can click on it if you want to disable it and go back to flying solo.

To test the effectiveness of Copilot’s knowledge and how this could be of any help, just perform these simple steps in a simple HelloWorld.al file.

Under the trigger declaration, add a var section, then press Enter and Tab. GitHub Copilot will suggest creating a record variable called Customer of type Customer, as follows:

Figure 2.36: GitHub Copilot suggestions

You might accept the suggestion by simply pressing Tab twice.

From now on, you can continue experimenting with how good, fast, and proficient it is to develop together with GitHub Copilot.

If you want to learn more about GitHub Copilot, it is worth watching 20221121 - GitHub Copilot Write Extensions for Business Central with AL: https://www.youtube.com/watch?v=i-K3J6C5zkc.

You have been reading a chapter from
Mastering Microsoft Dynamics 365 Business Central - Second Edition
Published in: Mar 2024
Publisher: Packt
ISBN-13: 9781837630646
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime