Error Handling for Project Schedule API in Power Automate

Linn Zaw WinDyn365CE7 months ago17 Views

Calling
Project Schedule APIs within Power Automate cloud flows with Perform an
Unbound Action

can streamline project management tasks, but it requires careful error
handling to prevent operational issues.

The Project Schedule APIs in Power
Automate rely on an Operation Set to group multiple requests into a
single transaction. Typically, the flow structure involves
Create Operation Set at the beginning, executing API requests in
sequence, and concluding with an Execute Operation Set step.

Problem: Handling Failures Mid-Flow

A common challenge arises if any API call between the
Create Operation Set and
Execute Operation Set steps fails. This interruption causes the
flow to halt before reaching the final Execute Operation Set, leaving the Operation Set in an “Open” status (192350000) in the
Operation Set table (msdyn_operationset). When Operation Set
records with “Open” status reach x10 for a single user, the following error
occurs in the flow because each user can only have a
maximum of 10 open OperationSets as per the limitation.

ScheduleAPI-OV-0004:00000000-0000-0000-0000-000000000000: The maximum number of operation set allowed per user is 10.

Solution: Implementing Error Handling with Scopes

To prevent this accumulation of “Open” Operation Sets, consider structuring the flow with a Try-Catch pattern using Scope actions. This approach ensures that if any error, timeout, or skip event occurs during the process, a cleanup step updates the status of the incomplete Operation Set.

Steps for Error Handling

  1. Define the Try Scope: Place all steps between the Create Operation Set and Execute Operation Set actions within a single Scope (e.g., “Try”). This scope will contain all the critical API actions.

  2. Add a Catch Scope: Create another Scope (e.g., “Catch”) and configure it to run if the Try Scope fails, times out, or is skipped.

  3. Update Operation Set Status: Inside the Catch Scope, add a Dataverse “Update a Row” action. Set the status of the Operation Set to “Failed” by using the ID output from the Create Operation Set step, which releases the open Operation Set and allows the flow to proceed without reaching the 10-record limit.

Benefits of Using This Error Handling Approach

Implementing error handling through Scopes ensures that Operation Sets are not left in an “Open” status, preventing the flow from encountering the maximum operation limit. This approach is reliable, improves flow resilience, and maintains user productivity by automating the management of operation statuses during errors.

Using these steps, you can ensure your Power Automate flows with Project Schedule APIs remain efficient, effective, and error-resistant.

Original Post http://linnzawwin.blogspot.com/2024/11/error-handling-for-project-schedule-api.html

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
June 2025
MTWTFSS
       1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30       
« May   Jul »
Follow
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...