Microsoft Dynamics 365 Blog

When you are using Dynamics AX 2009 with Workflow and Role Center set up you might run into the following issue after you deleted a company account.

If you delete the company account ceu for example you might see the following Event logged to your Applicaiton event log:

Microsoft Dynamics AX Business Connector Session #.

An X++ exception has occurred.
Stack trace: The company ceu does not exist.

(S)\Classes\Workflow\getDocumentAsUser – line 21
(S)\Classes\Workflow\getDocumentRecord – line 16
(C)\Data Sets\UnifiedWorkListTmp\Data Sources\TmpUnifiedWorkList\Methods\init

No currency defined for company cm1

Additionally you might get confronted with the following error message in your Role Center page:

Failed to find workflow configuration

The reason for this error messages are still existing records in the WorkflowWorkItemTable table referencing the deleted company account ceu.

To identify if there are no longer valid entries for the deleted company account ceu in the WorkflowWorkItemTable table we used the following SQL query in Microsoft SQL Server Management Studio:

select * from WorkflowWorkItemTable where companyid = ‘ceu’

After manually removing the invalid records from this table the error message(s) stopped showing up.

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!