Skip to content

Commit 0693266

Browse files
authored
Merge pull request #9178 from MicrosoftDocs/main
Auto push to live 2025-06-24 02:34:22
2 parents d7376dc + 065f4ea commit 0693266

File tree

4 files changed

+179
-20
lines changed

4 files changed

+179
-20
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Accounting Distribution Validation Failed Error
3+
description: Solves an issue where you can't submit a purchase order for approval after it's updated.
4+
ms.reviewer: shubhamshr, ashuaggarwal
5+
ms.date: 06/24/2025
6+
ms.custom: sap:Purchase order procurement and sourcing\Issues with purchase orders
7+
---
8+
# Workflow approval fails with the "Accounting distribution validation failed" error
9+
10+
This article addresses an issue where the workflow approval process for a purchase order fails due to unvalidated [accounting distributions](/dynamics365/finance/accounts-payable/accounting-distributions). The error occurs when the purchase order is modified and resubmitted without validating the accounting distributions, causing the workflow process to stop.
11+
12+
## Symptoms
13+
14+
After [setting a purchase order back to "Draft"](/dynamics365/supply-chain/procurement/purchase-order-approval-confirmation#changing-purchase-orders) and modifying the line items (for example, changing the unit price or the confirmed receipt date), when you submit the purchase order for approval, the workflow approval process fails with the following error:
15+
16+
> Stopped (error): Accounting distribution validation failed. Please recall purchase order workflow and rectify accounting distributions. This action can only be completed after the line number 1 is fully distributed.
17+
18+
### Steps to reproduce
19+
20+
1. Create and approve a purchase order for a vendor with change management enabled.
21+
2. Confirm the purchase order.
22+
3. Request a change to revert the purchase order to "Draft" status.
23+
4. Modify the line items, for example, changing the unit price or the confirmed receipt date.
24+
5. Resubmit the purchase order for workflow approval without first saving the line items.
25+
6. Observe that the workflow approval fails with the error.
26+
27+
## Cause
28+
29+
When the **Auto calculate totals and accounting distributions** feature is enabled, the system automatically recalculates the purchase order totals and accounting distributions when a purchase order is submitted to the workflow. This recalculation is part of the workflow validation process, and any validation errors are displayed in the workflow history. For more information about the feature, see [Procurement and sourcing feature updates](/dynamics365/release-plan/2023wave2/finance-supply-chain/dynamics365-supply-chain-management/procurement-sourcing-feature-state-updates-10036#features-becoming-generally-available-with-the-10036-release).
30+
31+
If accounting distribution errors occur, such as missing financial dimensions or invalid combinations, the system generates a warning or error and prevents the workflow submission until the issue is resolved.
32+
33+
## Workaround
34+
35+
To avoid workflow failures due to unvalidated accounting distributions, you can disable the auto calculation feature. This action ensures that errors in accounting distributions are identified and resolved before the workflow submission.
36+
37+
1. Navigate to **Accounts Payable** > **Setup** > **Parameters**.
38+
2. Select the **General** tab.
39+
3. Locate the **Purchase Order Workflow** section.
40+
4. Disable the **Auto calculate totals and accounting distributions** parameter.
41+
5. Save your changes.
42+
43+
By disabling this parameter, the system prevents you from submitting a purchase order to the workflow if there are accounting distribution errors. Instead, it displays a warning, requiring you to fix the distribution errors first. Once the errors are resolved, you can submit the purchase order to the workflow, and it will proceed without issues.
44+
45+
## Additional considerations
46+
47+
If disabling the **Auto calculate totals and accounting distributions** parameter is unacceptable to your organization, ensure that all accounting distribution errors are resolved before submitting the purchase order to the workflow.
48+
49+
- Ensure that all required financial dimensions are correctly assigned to the accounting distributions.
50+
- After modifying the purchase order line items, make sure to manually save the changes.
51+
52+
## More information
53+
54+
[Approve and confirm purchase orders](/dynamics365/supply-chain/procurement/purchase-order-approval-confirmation)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Unable to Cancel a Budget-Enabled Purchase Order in a Closed Period
3+
description: Describes a workaround for canceling or modifying a budget-controlled purchase order when the accounting period is closed in Microsoft Dynamics 365 Supply Chain Management.
4+
ms.reviewer: shubhamshr, ashuaggarwal
5+
ms.date: 06/24/2025
6+
ms.custom: sap:Purchase order procurement and sourcing\Issues with purchase orders
7+
---
8+
# Can't cancel a purchase order governed by budget within a closed period
9+
10+
This article explains how to resolve issues when attempting to cancel or modify a purchase order (PO) [governed by budget](/dynamics365/supply-chain/procurement/tasks/create-purchase-order-governed-by-budget#perform-budget-checking) in Microsoft Dynamics 365 Supply Chain Management, specifically when the associated accounting period is closed or on hold.
11+
12+
## Symptoms
13+
14+
When you try to cancel or change a PO, you might receive one of the following error messages:
15+
16+
- > Budget control is enabled. This purchase order cannot be cancelled as the accounting date period is either on-hold or closed. You can use the purchase order year-end close process to move the purchase order to the next fiscal year or open the ledger calendar associated with the accounting date.
17+
- > A change cannot be made to this purchase order as the accounting period is on hold or closed. You can use the purchase order year-end close process to update the order to the next fiscal year.
18+
19+
## Cause
20+
21+
This behavior is by design. The ability to cancel or modify a PO depends on the budget check status and the accounting period's status.
22+
23+
For example, consider a fiscal year that runs from April 2023 to March 2024.
24+
25+
### Scenarios where you can cancel an open PO
26+
27+
- A budget check isn't performed or failed.
28+
29+
If the PO hasn't undergone a budget check, or if the budget check has failed, you can cancel the PO.
30+
31+
- A budget check is passed, and the closed period isn't the last period of the fiscal year.
32+
33+
If the PO has passed the budget check and the accounting date falls within a closed period that isn't the last period of the fiscal year, the system will use the next open or available period within the same fiscal year.
34+
35+
Example: If the accounting date of the PO is in December 2023, and the December 2023 period is closed while January, February, and March 2024 are open, you can still cancel the PO without reopening the December 2023 period.
36+
37+
### Scenarios where you can't cancel an open PO
38+
39+
- A budget check is passed and the accounting date falls in the last period of the fiscal year.
40+
41+
If the PO has passed the budget check and the accounting date is in the last period of the fiscal year (for example, March 2024) and that period is closed, you can't cancel the PO unless you reopen the closed period.
42+
43+
## Workaround
44+
45+
To cancel a PO in a closed period, you must reopen the closed or on-hold period. For example, if the blocking error message indicates that the March 2024 period is closed, follow these steps to reopen that period and then cancel the PO:
46+
47+
1. Navigate to **General ledger** > **Ledger setup** > **Ledger calendars**.
48+
1. Find the ledger calendar for the fiscal year and accounting period of the PO.
49+
1. Change the status of the closed or on-hold period (for example, March 2024) to **Open**.
50+
1. Cancel the PO.
51+
1. After cancellation, return to the ledger calendar and set the period back to its original status (for example, closed or on hold).
52+
53+
> [!NOTE]
54+
> We recommend that you perform this operation outside business hours to minimize the risk of other users creating records during the reopening period.
55+
56+
## More information
57+
58+
[Fiscal calendars, fiscal years, and periods](/dynamics365/finance/budgeting/fiscal-calendars-fiscal-years-periods)

support/dynamics-365/supply-chain/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
href: procurement/vendor-rebate-not-cumulated.md
133133
- name: A product receipt voucher number is consumed even when not generating a voucher
134134
href: procurement/voucher-number-consumed.md
135+
- name: Can't cancel a purchase order within a closed period
136+
href: procurement/unable-to-cancel-po.md
135137
- name: Can't delete a purchase order line after it's confirmed
136138
href: procurement/purchase-order-line-deletion-restriction.md
137139
- name: Can't add a line to a purchase requisition after requesting a change
@@ -164,6 +166,8 @@
164166
href: procurement/post-setting-turned-off.md
165167
- name: Unit prices on purchase orders aren't calculated based on the unit conversion
166168
href: procurement/po-unit-prices-not-calculated.md
169+
- name: Workflow approval fails with "Accounting distribution validation failed"
170+
href: procurement/po-workflow-accounting-distribution.md
167171
- name: You can only complete a purchase order action for fully distributed line numbers
168172
href: procurement/action-requires-full-distribution.md
169173
- name: You can't add the Price unit field to the Purchase agreement page

support/power-platform/power-apps/manage-apps/wrap-issues.md

Lines changed: 63 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Provides solutions to common issues when using the wrap feature in
44
ms.reviewer: sitaramp, koagarwa
55
ms.author: arijitba
66
author: arijitba
7-
ms.date: 06/17/2025
7+
ms.date: 06/24/2025
88
ms.custom: has-azure-ad-ps-ref, azure-ad-ref-level-one-done, sap:App Management\Wrap an app
99
---
1010
# Troubleshoot wrap feature issues in Power Apps
@@ -87,17 +87,18 @@ If you can't sign in or see data in your wrapped app, try the following actions:
8787

8888
You might encounter these error codes in the wrap wizard:
8989

90-
| Error Code | Error Message |
90+
| Error code | Error message |
9191
|------------|-------------|
9292
| [1000118](#error-code-1000118) | Default subscription not found or missing access permissions. |
93-
| [1000119](#error-code-1000119) | Key vault doesn't exist or is missing access privileges. |
94-
| [1000120](#error-code-1000120) | No organization ID tags found on key vault. |
95-
| [1000121](#error-code-1000121) | Android keystore isn't valid. Missing tag and/or certificate. |
96-
| [1000122](#error-code-1000122) | iOS certificate isn't valid. |
97-
| [1000123](#error-code-1000123) | iOS profile isn't valid. |
98-
| [1000128](#error-code-1000128) | Missing access key used while accessing Azure Blob storage location. |
99-
| [1000130](#error-code-1000130) | Missing default value: The required environment variable for setting up Azure Key Vault in the wrap wizard isn't set. |
100-
| [1000131](#error-code-1000131) | Missing tags for the specified Azure Key Vault resourceID. |
93+
| [1000119](#error-code-1000119) | Key vault doesn't exist or is missing access privileges.|
94+
| [1000120](#error-code-1000120) | No organization ID tags found on key vault. Ensure that the tag {Bundle ID}.{organization-id} is present and uses the correct case sensitivity.|
95+
| [1000121](#error-code-1000121) | Android keystore isn't valid. Ensure that the tag {Bundle ID}.{keystore} is present and uses the correct case sensitivity.|
96+
| [1000122](#error-code-1000122) | iOS certificate isn't valid. Missing Tag and/or Secret. Ensure that the tag {Bundle ID}.{cert} is present and uses the correct case sensitivity.|
97+
| [1000123](#error-code-1000123) | iOS profile isn't valid. Ensure that the tag {Bundle ID}.{profile} is present and uses the correct case sensitivity.|
98+
| [1000128](#error-code-1000128) | Missing access key required to access the Azure Blob Storage location. Ensure that the tag {Bundle ID}.{accessKey} is present and uses the correct case sensitivity.|
99+
| [1000130](#error-code-1000130) | Missing default value: The required environment variable for setting up Azure Key Vault in the wrap wizard isn't set.|
100+
| [1000131](#error-code-1000131) | No tags or missing access permission for the specified Azure Key Vault. |
101+
| [1000132](#error-code-1000132) | Missing environment variable 'PA_Wrap_KV_ResourceID' for the targeted environment. |
101102

102103
### Error code 1000118
103104

@@ -161,7 +162,7 @@ Error message: Key vault doesn't exist, or Key vault is missing access privilege
161162

162163
### Error code 1000120
163164

164-
Error message: No organization ID tags found on key vault.
165+
Error message: No organization ID tags found on key vault. Ensure that the tag {Bundle ID}.{organization-id} is present and uses the correct case sensitivity.
165166

166167
#### Resolution steps
167168

@@ -179,7 +180,7 @@ Error message: No organization ID tags found on key vault.
179180

180181
### Error code 1000121
181182

182-
Error message: Android keystore isn't valid. Missing Tag and/or Certificate.
183+
Error message: Android keystore isn't valid. Ensure that the tag {Bundle ID}.{keystore} is present and uses the correct case sensitivity.
183184

184185
#### Resolution steps
185186

@@ -198,7 +199,7 @@ Error message: Android keystore isn't valid. Missing Tag and/or Certificate.
198199

199200
### Error code 1000122
200201

201-
Error message: iOS certificate isn't valid.
202+
Error message: iOS certificate isn't valid. Missing Tag and/or Secret. Ensure that the tag {Bundle ID}.{cert} is present and uses the correct case sensitivity.
202203

203204
#### Resolution steps
204205

@@ -217,7 +218,7 @@ Error message: iOS certificate isn't valid.
217218

218219
### Error code 1000123
219220

220-
Error message: iOS profile isn't valid.
221+
Error message: iOS profile isn't valid. Ensure that the tag {Bundle ID}.{profile} is present and uses the correct case sensitivity.
221222

222223
#### Resolution steps
223224

@@ -232,7 +233,7 @@ Error message: iOS profile isn't valid.
232233

233234
### Error code 1000128
234235

235-
Error message: Missing access key used while accessing Azure Blob storage location.
236+
Error message: Missing access key required to access the Azure Blob Storage location. Ensure that the tag {Bundle ID}.{accessKey} is present and uses the correct case sensitivity.
236237

237238
#### Resolution steps
238239

@@ -246,19 +247,61 @@ Error message: Missing default value: The required environment variable for sett
246247

247248
#### Resolution steps
248249

249-
- Add the resource ID for the Azure key vaults you intend to use with your wrap application.
250-
- Ensure that all required tags are present for the resource ID linked to the Bundle ID specified in the wrap wizard.
250+
1. Assign the resource ID of the Azure key vault you intend to use with your wrap application to the variable.
251+
252+
2. Confirm that the specified resource ID includes all required tags associated with the Bundle ID defined in the wrap wizard.
251253

252254
For more information, see [Step 2: Target platform](/power-apps/maker/common/wrap/wrap-how-to#step-2-target-platform).
253255

254256
### Error code 1000131
255257

256-
Error message: Missing tags for the specified Azure Key Vault resourceID.
258+
Error message: No tags or missing access permission for the specified Azure Key Vault.
257259

258260
#### Resolution steps
259261

260-
- After setting up Azure key vaults, add all required tags.
261-
- Confirm that the resource ID associated with the Bundle ID specified in the wrap wizard includes every necessary tag.
262+
1. Assign the resource ID of the Azure key vault you intend to use with your wrap application to the variable.
263+
264+
2. Confirm that the specified resource ID includes all required tags associated with the Bundle ID defined in the wrap wizard.
265+
266+
3. Ensure you have permission to access your key vault:
267+
268+
1. As a Microsoft Entra ID (formerly Azure AD) admin, add the service principal for the AppID "4e1f8dc5-5a42-45ce-a096-700fa485ba20" by running the following commands in PowerShell:
269+
270+
```powershell
271+
Connect-AzureAD -TenantId <your tenant ID>
272+
New-AzureADServicePrincipal -AppId 4e1f8dc5-5a42-45ce-a096-700fa485ba20 -DisplayName "Wrap KeyVault Access App"
273+
```
274+
275+
1. In the [Azure portal](https://portal.azure.com), under **Access Control (IAM)**, assign the **Reader** role to your service principal:
276+
277+
1. Go to **Access control (IAM)**, and then select **Add role assignment**.
278+
279+
:::image type="content" source="media/wrap-issues/add-role-assignment.png" alt-text="Screenshot that shows the Add role assignment option in the Access control (IAM) tab." lightbox="media/wrap-issues/add-role-assignment.png":::
280+
281+
1. Choose **Reader** under **Job function roles** and go to the **Members** tab.
282+
283+
:::image type="content" source="media/wrap-issues/add-members.png" alt-text="Screenshot that shows the Members tab on the top menu." lightbox="media/wrap-issues/add-members.png":::
284+
285+
1. Search for your app name.
286+
287+
:::image type="content" source="media/wrap-issues/select-members-to-add-role.png" alt-text="Screenshot that shows how to search for your app." lightbox="media/wrap-issues/select-members-to-add-role.png":::
288+
289+
1. Assign the **Reader** role.
290+
291+
:::image type="content" source="media/wrap-issues/assign-reader-role-to-wrap-keyvault-access-app.png" alt-text="Screenshot that shows how to assign a Reader role to your app." lightbox="media/wrap-issues/assign-reader-role-to-wrap-keyvault-access-app.png":::
292+
293+
For more information, see [Step 2: Target platform](/power-apps/maker/common/wrap/wrap-how-to#step-2-target-platform).
294+
295+
---
296+
### Error code 1000132
297+
298+
Error message: Missing environment variable 'PA_Wrap_KV_ResourceID' for the targeted environment.
299+
300+
#### Resolution steps
301+
302+
1. Check whether the environment variable `PA_Wrap_KV_ResourceID` exists in the target environment. If it doesn't, create it.
303+
304+
2. Ensure the name follows the correct naming convention without typos or formatting errors.
262305
263306
For more information, see [Step 2: Target platform](/power-apps/maker/common/wrap/wrap-how-to#step-2-target-platform).
264307

0 commit comments

Comments
 (0)