Posts

Showing posts from 2023

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...