Posts

Custom Auto Number in Dataverse with Fiscal Year-Based Incrementing Using Plugin Code

Image
In many scenarios, businesses require custom auto-numbering for records in Microsoft Dataverse that go beyond the default functionality provided. In this article, I’ll walk you through a solution that involves creating a custom auto-number field without using the out-of-the-box auto-numbering feature in Dataverse. Instead, we’ll use a combination of a custom entity as a counter and a plugin that triggers on the pre-create event of the target table. The Approach For this solution, we’ll create a custom table called Fiscal Year Counter . This table will manage our numbering sequence based on the fiscal year. The idea is to dynamically generate invoice numbers that reset each fiscal year, providing a high level of customization to fit your organization’s unique fiscal calendar. The Fiscal Year Counter Table Setup First, create a table named Fiscal Year Counter with the following fields: Name (String): To store the fiscal year name, such as “FY2024.” Start Date (Date Only, Time

Connecting the Paconn CLI Tool to GCC, GCCH, and DoD Environments for Power Platform Connectors

Image
When working with the paconn CLI tool to create and manage custom connectors in the Power Platform, it’s essential to configure your environment settings properly, especially when targeting different government cloud environments like GCC, GCC High, and DoD. In this article, we’ll guide you through setting up these configurations, including creating a connectionSettings.json file for each environment, downloading a custom connector, and updating the connector’s settings for seamless management. Prerequisites Azure Subscription : You need an active Azure subscription to register an application. Paconn CLI Tool : Ensure you have the paconn CLI tool installed. You can install it using Python’s pip: pip install paconn Step 1: Create an Azure App Registration Begin by registering an application in Azure Active Directory (Azure AD) that will serve as the identity for your paconn operations. Navigate to Azure AD : Sign in to the Azure portal and go to Azure Active Directory .

Overcoming OpenAPI 2.0 `multi` CollectionFormat Challenges in Power Automate Custom Connectors

Image
Integrating APIs into Power Automate flows often requires creating custom connectors, a process that can encounter challenges with certain API specifications. Specifically, the OpenAPI 2.0 specification allows array and multi-value parameters to be passed in various formats, including the multi collection format. This format is particularly troublesome for Power Automate’s Custom Connector wizard, which does not support it natively. This article outlines the issue and provides a detailed workaround using custom code components and modifying input parameters, ensuring seamless API integration. The Challenge with multi CollectionFormat The OpenAPI 2.0 specification introduces several collection formats for array parameters, with multi being one of them. This format allows multiple values for the same parameter to be passed by repeating the parameter’s name in the query string, which is not directly supported in Power Automate Custom Connectors. Attempting to import an OpenAPI speci

Installing PowerShell Modules in Firewalled and Air-Gapped Systems

Image
Managing IT environments with limited or no internet access, such as firewalled systems or air-gapped setups, presents unique challenges. One of the critical tasks in such environments is the installation and usage of PowerShell modules, which often require internet access for download and updates. This guide provides a method to facilitate the offline installation of PowerShell modules using custom scripts and includes a practical example of managing Power Platform environments by limiting developer environments. Background Firewalled systems have restricted internet access, necessitating special methods to manage and configure software. Air-gapped systems are completely isolated from the internet, making direct downloads impossible. In such environments, administrators need to manually transfer and install PowerShell modules to manage various tasks effectively. Step-by-Step Guide Step 1: Prepare the PowerShell Module for Offline Use The first script, PowerShellModuleOfflinePack

Harnessing Host Form Data with PCF Controls in Model-Driven Applications

Image
Introduction This tutorial delves into integrating PowerApps Component Framework (PCF) controls with host form data within Microsoft Power Platform’s model-driven apps. This article will guide you through the necessary scripting to expose and consume formContext and globalContext from a custom table called new_Competitor. Aimed at enhancing both custom and Microsoft Form Component PCF controls, this approach ensures dynamic interactions with the host form data. Disclaimer : It’s important to note that there are various methods to retrieve data within PCF controls, including the use of WebAPI. While WebAPI provides a versatile way to access data across different entities and contexts, the approach described in this tutorial focuses on directly integrating with host form data, which can be particularly beneficial in specific use cases where immediate context is crucial. This method allows for real-time data interactions that are essential for certain scenarios, providing a streamlined