Humans should not be middleware

Dag Calafell

Blog2026-04-29T18:40:55-06:00

Who is online for all AX databases on current SQL server?

January 29, 2018|

In the situation where you must support more than one AX environment with the same SQL Server, maintenance can become tricky unless you know who is online.  The following SQL Script will list all of the users who are online. EXECUTE master.sys.sp_MSforeachdb 'USE [?]; IF OBJECT_ID(''?.dbo.[SysClientSessions]'', ''U'') IS NOT NULL [...]

AX 2012 Demo VM on Parallels (OSx)

January 26, 2018|

So I've got this iMac in my office with 24 GB of RAM so naturally, what am I doing with all that?  Well, I have hobbies and test my Linux scripts, firewalls, and even some CTF challenges within there.  Dynamics expert by day, and Linux enthusiast by night!  Anyways there [...]

Showing Bible Verse when PowerShell is Opened

January 23, 2018|

Using the code created in a previous post in our PowerShell profile, we can have PowerShell display a random Bible quote whenever it is opened.StepsDownload PSBible-NET.psm1 from Github.Place the file in %UserProfile%DocumentsWindowsPowerShellModules.  You may need to create the folders if they do not already exist.Create "profile.ps1" in %UserProfile%DocumentsWindowsPowerShell and put this [...]

Search the Internet for Bible References on a Topic

January 21, 2018|

Scraping a Web Site for Bible ReferencesUsing the function from the prior post, we can leverage PowerShell to download a web page and parse it for us to find references to scripture.$requestResult = Invoke-WebRequest-Uri "https://blogs.lcms.org/2018/loving-your-internet-neighbor"-DisableKeepAlive -UseBasicParsing-ErrorAction SilentlyContinueif ($requestResult.StatusCode -eq200){    Get-BibleReferences$requestResult.Content | Format-Table-AutoSize} OutputReference    Book    Chapter Verses From To---------  [...]

Find Bible Verses using PowerShell

January 21, 2018|

Using regular expressions and PowerShell we can create some code which will parse a Bible verse and then these values can be used in other ways.  In the function below I've used the .NET RegEx class to read Bible verses, which can be read from a text/CSV file into a [...]

Allow WEMO Communication through your Firewall

January 6, 2018|

The following instructions will enable your WEMO devices to communicate through your firewall without Upnp enabled.  Disabling Upnp is a best practice because otherwise any device inside your network would be able to open up any port to the outside world.  The screen shots will be from a pfSense 2.4 [...]

Create a VM network in Parallels with a Linux VM Firewall

January 5, 2018|

Parallels Desktop has been a solid virtualization option for my iMac.  It enables easy sharing of folders and other advanced options I felt would be useful, i.e. seamless Windows programs.  For my latest adventure I wanted to test out some Linux firewall configurations without messing around with my physical environment.  [...]

Comparing BOMs in AX

December 21, 2017|

Bills of material in AX 2012 can be effective dated, and this provides the ability to keep prior versions.  Now it has been several years and the question arises- what changed between versions?  There is a built-in way to compare BOMs from the same product, or even two different -perhaps [...]

Outlook Setup Wizard – Dynamics 365 for Finance and Operations

December 15, 2017|

In Microsoft Dynamics 365 for Finance and Operations, you may want to connect your Office365 email to receive contacts, tasks, and appointments from the ERP.  To do so, navigate to Organization Administration > Setup > Office integration > Microsoft Outlook Setup Wizard.  When it asks for the Exchange Web Services [...]

Unable to Configure Report for PrecisionForms – Record Already Exists

July 3, 2017|

Symptom:Cannot create a record in Delivery destinations (BT_DPA_AOT_ReportDestinations). AOT object ID: 13, 2.The record already exists.Solution:The unique index for the BottomLine tables is RecID.  Run the following SQL statement on your AX database.  Replace DATABASE with the name of your AX database.IF OBJECT_ID('DATABASE.dbo.[BT_DPA_AOT_ReportDestinations]', 'U') IS NOT NULL BEGIN       UPDATE SystemSequences       SET NEXTVAL = 1 [...]

Export AX Ledger Transactions via SQL

June 2, 2017|

This SQL serves as a starting point to include any number of financial dimensions.SELECT GENERALJOURNALENTRY.SUBLEDGERVOUCHER as Voucher, DIMENSIONATTRIBUTEVALUECOMBINATION.DisplayValue as [Account+Dims], MAINACCOUNT.MainAccountID as [Account], DIMENSIONATTRIBUTELEVELVALUE.DisplayValue as [Dept], GENERALJOURNALACCOUNTENTRY.ACCOUNTINGCURRENCYAMOUNT as AmountMST, GENERALJOURNALACCOUNTENTRY.TRANSACTIONCURRENCYAMOUNT as AmountCur, GENERALJOURNALACCOUNTENTRY.TRANSACTIONCURRENCYCODE as CurrencyCodeFROM DynamicsAX2012.GENERALJOURNALENTRYINNER JOIN DynamicsAX2012.GENERALJOURNALACCOUNTENTRY ON GENERALJOURNALENTRY.RECID = GENERALJOURNALACCOUNTENTRY.GENERALJOURNALENTRYINNER JOIN DynamicsAX2012.DIMENSIONATTRIBUTEVALUECOMBINATION ON DIMENSIONATTRIBUTEVALUECOMBINATION.RECID = GENERALJOURNALACCOUNTENTRY.LEDGERDIMENSIONINNER JOIN DynamicsAX2012.DIMENSIONATTRIBUTEVALUEGROUPCOMBINATION [...]

Unable to deploy AX2012 Azure Virtual Machine

May 18, 2017|

There is a AX 2012 virtual machine available on the Azure Portal.  When I tried to create one, I received the following error (with typo):Project was created but there were problems creating deployment instance. You need to be a service administrator or co-administator for the selected Azure subscription or the [...]

Finding invalid document handling references

May 10, 2017|

static void listDocuHandling_InvalidPaths(Args _args){    DocuRef                 docuRef;    DocuValue               docuValue;    SysOperationProgress    progress;    Common                  common;    ;    setPrefix("Invalid document handling file references");    // Initialize progress indicator    select count(RecId) from docuRef;    progress = new SysOperationProgress(1, true);    progress.setTotal(docuRef.RecId);    progress.setCaption(funcname());    while select docuRef    join docuValue    where docuValue.RecId == docuRef.ValueRecId    {        progress.setText(docuRef.Name);        common = docuRef.refCommon();        setPrefix((docuRef.Name) ? int642str(docuRef.RecId) [...]

Work item could not be created. Insufficient rights for user

May 5, 2017|

There are 60 workflows available within AX and it can be frustrating to try and set up specific security for each one.  The following message is no exception (pun).SymptomStopped (error): X++ Exception: Work item could not be created. Insufficient rights for user cluther. at SysWorkflowWorkItem-createSysWorkflowWorkItem-createWorkItemsSysWorkflow-saveSysWorkflowQueue-resumeSysWorkflowMessageQueueManager-executeTaskSysWorkflowMessageQueueManager-runDetailsThrows the error from ClassesSysWorkflowWorkItem.create() line 155ApproachAdd [...]

Test Data Transfer Tool – Object reference error

April 25, 2017|

The Test Data Transfer Tool can be invaluable in copying data from one environment to another for testing.  Sometimes you may want to export the data against a restored copy of an environment, either due to security, or to limit any chance of performance degradation during the export.It is important [...]

List AOSs Supported by SQL Server Instance

February 18, 2017|

I recently found myself in the situation of needing to know what Dynamics AX Application Object Servers (AOS) are online in an environment.  The situation was a bit simplified because all of the AOS were served by the same SQL Server.  So I set out to build a SQL script [...]

Go to Top