Posts

The Secret Value Store: keeping credentials out of your tables

Image
A reusable AL pattern for storing API keys, client secrets, and access tokens so they never sit in a readable field — not on the card, not in the database, not over the API. Storage IsolatedStorage + SecretText Table role Write-only capture, never at rest On screen Masked, always Via API Unreachable — not a field 1. Why a text field is the wrong home for a secret Almost every setup table in a Business Central extension ends up needing to hold something sensitive — an API key, an OAuth client secret, a webhook signing token. The instinctive way to store it is a Text[250] field, maybe with ExtendedDatatype = Masked so it shows as dots on the card. That solves exactly one problem: what a user sees when the card is open. It does nothing about what SQL keeps, what a full-table export contains, or what an API page or query built on top of that table hands back to anyone with read access. Masking is a display property. The field underneath...

Power Apps Portal: How to Display Tooltips on a Form

Image
In this article, I will explain how to display tooltips in a Power Apps Portal (Power Pages) form . Tooltips are a simple yet powerful way to improve user experience in Power Apps Portal (Power Pages) . In this post, I’ll explain how to display tooltips on portal forms using Dataverse field descriptions . 🧩 What is a Tooltip? A tooltip is shown when a user hovers over a field label. In Power Pages, this tooltip comes directly from the Description property of a Dataverse column. Step 1: Add Descriptions to Dataverse Columns. I used an existing Dataverse table named Order and added descriptions to the required columns.  These descriptions will be used as tooltip text in the portal. Step 2: Update the Main Form Open the Order Main Form Add the required fields Save and publish the form Step 3: Configure Basic Form and Web Page Create or update a Basic Form that uses the Order Main Form Attach the Basic Form to a Web Page in the portal Step 4: Enable Tooltips on the Basic ...

How to Create API with Header and line data & Auto-Posting APIs in Business Central

Image
 1 . Creating a Custom API Page Define PageType = API Required API properties ( APIPublisher , APIGroup , APIVersion , EntityName , etc.) Create Purchase Order header API Add subpage for lines API:  https://api.businesscentral.dynamics.com/v2.0/<EnvironmentName>/api/<APIPublisher>/<APIgroup>/v2.0/companies(<CompanyId>)/purchaseorderapis?$filter=no eq 'PR-ORD-0017869'&$expand=purchaseorderlineapis Method: GET Response: Get header and line response. 3. Creating an API to Post Purchase Orders Business scenario: Convert PO → Posted Purchase Invoice Create global function with [serviceEnabled]. API: https://api.businesscentral.dynamics.com/v2.0/<EnvironmentName>/api/<APIPublisher>/<APIgroup>/v2.0/companies(<CompanyId>)/purchaseorderapis(<systemidfrompurchaseheader>)/Microsoft.NAV.Createpurchaseinvoice Method: post     [ ServiceEnabled ]     [ Scope ( 'Cloud' ) ]     procedu...

Send Word Layouts for Email Body

Automatically Email Sales Invoices with Word Layout Email Body and PDF Attachment in Microsoft Dynamics 365 Business Central. Automatically emailing invoices with a nicely formatted email body and a PDF attachment is one of the most common Business Central automation needs. With a simple AL customization, you can make your system send branded invoice emails automatically — saving time, improving customer experience, and ensuring professional communication every time. What the automation does When this automation runs, it performs these key steps: Checks the invoice – ensures the invoice is completed or fully paid before sending. Finds the right email addresses – uses the customer’s “Sell-to Email” , and if available, also includes an Approver’s email . Uses a Word layout as the email body – gives your email a polished, branded appearance using your existing Word report layout. Creates a PDF of the invoice – automatically generates and attaches the PDF invoice to the...

Power Pages — Create Custom Button to Update Data via Web AP

Power Pages Tutorial — Create a Custom Button to Update Data via Web API In this tutorial, you’ll learn how to create a custom button in Microsoft Power Pages (formerly Power Apps Portals) that updates data in Microsoft Dataverse using the Web API . This step-by-step guide will help you securely perform server-side updates (PATCH calls) from your portal form with proper token-based authentication. We’ll take the Sales Order form as an example and build a “Submit to BC” button that changes the order’s status when clicked. Objective After completing this tutorial, you’ll be able to: Add custom action buttons to Power Pages. Safely call Dataverse Web API using JavaScript. Use the PortalWebapiJS Web Template to manage authentication. Configure and enable entity-level Web API permissions. Test the complete integration end-to-end. Step 1: Create a Custom Button in the Power Pages Form Open your desired form (e.g., “Edit Sales Order”). Click + Add → HTML text in...