SQL Snippets: Select Primary Keys for All Tables in Database

Microsoft SQL ServerThis post is part of the series on SQL Snippets.

The following SQL snippet will select all primary keys for all tables in the database in which the script is run.

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
SELECT ['Table'].TABLE_NAME ,['Column'].COLUMN_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS ['Table'] INNER JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE AS ['Column'] ON ['Column'].CONSTRAINT_NAME = ['Table'].CONSTRAINT_NAME WHERE ['Table'].CONSTRAINT_TYPE = 'PRIMARY KEY'

I used this script recently so that I could add primary keys to the Dymamics 365 BC Table Reference website.

In Microsoft Dynamics 365 Business Central (Customisation), how do I… Personalize a Page

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Customisation), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

There are more fields available to Business Central than are on page or lists by default. You can use the Personalize feature to add these fields if you want to, but also you sometimes have to use Personalize to expose functionality you want to use.

One example of this is the use of the deferral functionality on purchase or sales invoices; to apply a deferral to a purchase or sales invoice you need to add the Deferral Code field which allows you to pick the Deferral Template to apply (I will cover deferrals themselves in a future post, but just want to use this as the example to show personalization).

If we use Sales Orders as an example, open the page and click the Settings cog icon in the top right corner and click Personalize:

Sales Order page with the Settings tab open

Continue reading “In Microsoft Dynamics 365 Business Central (Customisation), how do I… Personalize a Page”

In Microsoft Dynamics 365 Business Central (Customisation), how do I… Series Index

Microsoft Dynamics 365 Business CentralI have recently started working with Microsoft Dynamics 365 Business Central and have decided to blog about it as I learn; I’ve started a In Microsoft Dynamics 365 Business Central, how do I… series which will include everything, but have also decided to break that down into a set of smaller series on specific areas of Dynamics BC.

This is the series index for the Customisation related posts I will be writing. The series index, below, will automatically update as each post in the series goes live so make sure you bookmark this post so you can see keep up-to-date with my journey into Business Central.

This series will also include “personalisations” which are a form of customisation limited to the person doing the personalization for themselves.

Continue reading “In Microsoft Dynamics 365 Business Central (Customisation), how do I… Series Index”

In Microsoft Dynamics 365 Business Central (Administration), how do I… Understand Search

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Administration), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

I am very much used to navigating through applications using menus, whether they be flat or drop down menus. While it is possible to do this with Dynamics BC, it is by no means quick or efficient to do so. You may have noticed in articles I’ve posted so far, but I have always been using search using the Tell me what you want to do search function to find pages.

This is because this is the quickest and most efficient way of finding and navigating to the page you want. If I wanted to find a Warehouse page, but don’t recall the exact name, I can click the Tell me what you want to do and type warehouse and the search will return relevant entries broken into sections:

Search results for warehouse

Continue reading “In Microsoft Dynamics 365 Business Central (Administration), how do I… Understand Search”

In Microsoft Dynamics 365 Business Central (Administration), how do I… Know Which Keyboard Shortcuts Are Available

Microsoft Dynamics 365 Business CentralThere are a number of keyboard shortcuts available in Microsoft Dynamics 365 Business Central which, by nature, are not very discoverable. Fortunately, there is a page on Microsoft Docs which provides an overview of the available keyboard shortcuts.

This is a very comprehensive list of the available shortcuts; fortunately, there is second page listing only the most popular shortcuts.

Continue reading “In Microsoft Dynamics 365 Business Central (Administration), how do I… Know Which Keyboard Shortcuts Are Available”

In Microsoft Dynamics 365 Business Central (Administration), how do I… Extend Trial

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Administration), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

When you sign up for a free trial of Dynamics BC you get 30 days to try it out. Once this thirty days expires, you can subscribe to use Dynamics BC as your new ERP or, if you still want to do some testing, extend the trial for a further thirty days.

You can request the extension yourself and it will start immediately from when you click the button, but note that you only get one extension of thirty days.

To extend your free trial, sign in with the account used to create the trial initially and at the top of the page, you will see a notification that your trial has expired; click the Extend trial… link in the notification:

Dynamics BC free trial expired notification

Continue reading “In Microsoft Dynamics 365 Business Central (Administration), how do I… Extend Trial”

In Microsoft Dynamics 365 Business Central (Administration), how do I… Set Update Window

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Administration), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

In the previous post on seting an update date, I briefly mentioned an “update window”, but didn’t go into any detail. Well, in addition to being able to set an update date which is the earliest date the update will be applied you can also define an update window which is the times between which the update will be installed, once the update date has been reached. The update window allows you to specify times when your system will not be in active use, such as overnight, to allow updates to be applied without disrupting your users.

Like the update date, the update window is set in the Dynamics BC Admin Center. When you access the admin center, you’ll see your environments listed; click the name of the one you want to set an update window for (you will need to repeat if you have multiple environments):

Dynamics BC admin center listing the environments

Continue reading “In Microsoft Dynamics 365 Business Central (Administration), how do I… Set Update Window”

In Microsoft Dynamics 365 Business Central (Administration), how do I… Set Update Date

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Administration), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

In the previous post on understanding the Dynamics BC rollout timeline, I mentioned that updates to an environment can be scheduled; this allows you to choose when an environment will be updated, allowing you time to thoroughly test to make sure that nothing will break or change in a way which needs to be explained to users.

You can set the update date through the Dynamics BC Admin Center. Open the admin center to see your available environments.

In the 6th and 7th columns you will see the Current Version and the Available Update Version; click the name of the environment for environment for which you want to an update date (you will need to repeat for each environment to be changed):

Dynamics BC Admin Center showing list of companies

Continue reading “In Microsoft Dynamics 365 Business Central (Administration), how do I… Set Update Date”

Installing Microsoft Dynamics 365 Business Central 2022 Wave 2 On-premise Demo

Microsoft Dynamics 365 Business CentralBack in August of this year, I did a short series of articles on installing the Microsoft Dynamics 365 Business Central 2022 Wave 1 demo. In October, 2022 Wave 2 was released; I’ve decided to install a new on-premise demo environment using this version, which will allow me to use that demo environment when travelling if I don’t have an Internet connection.

The environment I am using is a similar one as I used for the Wave 1 demo series; there is a VM and client server, both running Windows Server 2022 Standard.

You can download Dynamics BC 2022 Wave 2 here.

Once you’ve downloaded the installation media and extracted the files, launch the setup.exe installation routine and click Next on the welcome page:

Welcome to the Microsoft Dynamics Business Central Setup

Continue reading “Installing Microsoft Dynamics 365 Business Central 2022 Wave 2 On-premise Demo”

Microsoft Dynamics 365 Business Central Prior Release End of Servicing

Microsoft Dynamics 365 Business CentralMicrosoft transitioned many of their software applications to a Modern Lifecycle which provides support for only a limited number of releases in the expectation/requirement that users will upgrade regularly.

Now I’ve only been working with Microsoft Dynamics BC 365 Business Central for a short time, but from what I’ve seen the upgrades for the online/cloud version are released on a schedule where you can only choose to delay the upgrade for a certain length of time. All good as it means you will always be on a supported version.

The full lifecycle for on-premise Dynamics BC is here.

What brought his to mind, was a Product Lifecycle showing the end date of applications in 2023 which covers on-premise implementations of Dynamics BC.

The versions coming out of support in 2023 are:

  • Dynamics 365 Business Central on-premises (Modern Policy), 2021 release wave 2, version 19.x on 12th April.
  • Dynamics 365 Business Central on-premises (Modern Policy), 2021 release wave 2, version 19.x on 12th April.

Even though these applications are installed locally users should adhere to the support policy which requires regular upgrades. If you’re on one of the above versions, you should be looking to upgrade to 2022 release wave 2, which came out in October.

Microsoft Dynamics NAV 2013 and 2013 R2 are also out of support on 10th January 2023 which may affect some clients running older versions of the software.