Posts

Connecting to Third-Party Services: Handling SSL/TLS Certificate Validation in X++ and Ignoring Certificate Issues

Image
In the world of software development, securely connecting to third-party services is a crucial aspect. However, there are times when you may encounter SSL/TLS certificate validation issues while connecting to these services. If you are working with X++ in Microsoft Dynamics 365 Finance and Operations (D365FO), you might have come across the " The remote certificate is invalid according to the validation procedure. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel " error. There are a number of reasons why this error could be issued. For us, there was no valid certificate setup. In this blog post, we will explore how to handle this certificate validation issue in X++, allowing you to connect to the third-party service successfully.  Understanding the Certificate Validation Issue :  When making web requests in X++ to a service secured with SSL/TLS, the underlying .NET framework performs certificate validation to ensure a

Exploring Alternatives for SELECT TOP in X++ - D365 Finance and Supply Chain

Image
Recently, I had to write a query that retrieves Batches with the oldest Manufacturing Date in D365 Finance and Supply Chain, utilizing the "SELECT TOP" functionality. However, as you may be aware, the TOP keyword is natively supported in SQL but not when composing a select statement in D365 and X++. Nevertheless, there are alternative techniques to accomplish the same objective. Additionally, I have included some performance metrics to assist you in choosing the most appropriate method based on your specific requirements. Scenario : Write a query to get the top 3 batches and locations which have the oldest Manufacturing Date for an item and have Available Physical > 0, grouped by the Item, Batch Id, Manufacturing Date and the location. Assumptions : One legal entity, with one site and warehouse Here's how the SELECT TOP Clause would look like in SQL: Method 1 : Select statement using a break  Once we reach the required number of records, we break from th

Validate if a particular Financial Dimension is not null in #MSDyn365FO

Image
In this example, I'm just checking if the "BusinessUnit" dimension is not null or empty.

Get the primary index of a table in X++

Image
Simple method gets you the Primary key index of any table:

Start and Stop Azure VMs Using PowerApps, Power Automate(formerly known as Microsoft Flow), SharePoint and Azure Automation - Part 2

Image
Continuing from my previous post , in this one I’ll go through the other two steps of Power Automate(formerly known as Microsoft Flow) and Power Apps. Power Automate(formerly known as Microsoft Flow) This is a simple three-step workflow. I am using the Azure Automation connector to call the Azure Automation runbooks to start and stop the VMs. The Power App initiates the call Is an Azure Automation connector and the action is Create Job Then the status is returned to the Power App. The status is the VM power state which is either “running” or “stopped” Power App Creating the Power App is as simple you can learn more about Power Apps here . I made use of the Create an app feature on the SharePoint which basically created the app for me and I’ve made a couple of tweaks to make it work for me. These are some of the key features of the Power App that I’ve added which brings everything together: Dropdown which filters the list by Product. I have differ

Start and Stop Azure VMs Using PowerApps, Power Automate(formerly known as Microsoft Flow), SharePoint and Azure Automation - Part 1

Image
I’ve been trying to figure out how I can manage my Azure VMs using PowerApps. There are probably better ways of doing this so I would like to know your ideas too. I'll take you through what I have done. There are four components to this: SharePoint – this has a list of VMs that I want to control from PowerApps   Azure automation process automation with Runbook and module galleries  – I’m using the runbook for process automation Power Automate(formerly known as Microsoft Flow)  – automate VM start and stop by integrating SharePoint and Azure Automation PowerApps – used to build Azure VM Manager This is basically what my end result looks like: I will break it down into different pieces covering each component separately. 1. SharePoint This is simply just a list of machines that are under my Azure subscription which I wish to control from my PowerApps. You can read more here  about how to create a SharePoint list. In the next step, I'm using Azure Automa

HardwareStationSamples error RetailSDK Version 10

Image
While running an MSBUILD on RetailSDK in version 10 I came across an error that didn’t make sense because I wasn’t using it at all. This particular HardwareStationSamples solution would not build in the SampleExtensions . After a little bit of research I found out that the reference was in fact a CRT project. The Assembly prefix had changed to the one I had set up in my customization settings in my BuildTools folder hence the dll name was different. I changed it back to Contoso and rebuilt the CRT solution: CommerceRuntimeSamples.sln, under RetailSdk\SampleExtensions\CommerceRuntime I ran MSBUILD once again… no errors this time around.