Skip to content

James Pearson

109 Posts
8,525 Views
Dynamics 365 Business Central

Spare Your Blushes with Pre-Commit Hooks

It’s Summer (at least in the northern hemisphere), hooray. You’ve booked some time off, wrapped up what you were working on as best you can, committed and pushed…

📅 23 August 2022 👁 101 views
Dynamics 365 Business Central

Execute JavaScript with WebPageViewer for Business Central

TL;DR The WebPageViewer add-on has an overload to accept some JavaScript. You can use that to execute arbitrary script locally. WebPageViewer.SetContent(HTML: Text; JavaScript: Text); Executing JavaScript with WebPageViewer…

📅 11 July 2022 👁 129 views
Dynamics 365 Business Central

Tip: Editing RapidStart Configuration Package Files

TL;DR Extract the package with 7-Zip Open the extracted file in a VS Code / Notepad++ / text-editor-of-choice Edit the xml as required Use 7-Zip to compress in…

📅 17 June 2022 👁 160 views
Dynamics 365 Business Central

AL Test Runner Pre-Release Version

TL;DR There is now a pre-release version of the AL Test Runner extension for Visual Studio Code. It will have the latest (and possibly unstable) features. Pre-Releases VS…

📅 5 April 2022 👁 92 views
Dynamics 365 Business Central

Tip: Test for Tables Missing from Permission Sets

In PowerShell: $tablesInPermissionSets = @() $permissionSets = gci . -Recurse -Filter '*.al' | ? {(gc $_.FullName).Item(0).startsWith('permissionset')} $permissionSets | % { $content = gc $_.FullName -Raw [Regex]::Matches($content, '(?<=tabledata ).*(?=…

📅 7 March 2022 👁 66 views
Dynamics 365 Business Central

JSON References

TL;DR JSON types reference their value in memory, not the actual value. The below is snipped from https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/jsonobject/jsonobject-data-type Be careful making JSON types equal to one another. When…

📅 28 February 2022 👁 88 views
Dynamics 365 Business Central

Tip: Install all Apps in a Folder to a Container

Intro I do this fairly often to prep a new (local) container for development. The script needs to be run on the Docker host and assumes that the…

📅 3 February 2022 👁 169 views
Dynamics 365 Business Central

Tip: Get Current Callstack with a Collectible Error

The Code codeunit 50104 "Get Callstack" { SingleInstance = true; [ErrorBehavior(ErrorBehavior::Collect)] procedure GetCallstack() Callstack: Text var LF: Char; begin LF := 10; Error(ErrorInfo.Create('', true)); Callstack := GetCollectedErrors(true).Get(1).Callstack; exit(Callstack.Substring(Callstack.IndexOf(Format(LF))…

📅 19 January 2022 👁 85 views