Edit

Share via


Process approvals programmatically

Applies To: Project Operations Integrated with ERP, Project Operations Core.

Microsoft Dynamics 365 Project Operations provides the Process Project Approval Sets API. You can use this API to programmatically process approvals via Power Automate or a custom plug-in.

Process Project Approval Sets API

Name

msdyn_ProcessProjectApprovalSets

Input parameters

Parameter Type Description
ProjectApprovals Entity Collection A list of the project approval records to process.
ActionType Int

The action to perform on the records. The following options are available:

  • Reject: 192350001
  • Approve: 192350003
  • Cancel: 192350004
NoteLogName String The note that you want to attach to the approval set. This note is shown in the Logs section.

Notes

  • Different types of approvals (time, expense, or material) can be included in the ProjectApprovals entity collection.
  • The specified action type is performed on all records in the entity collection. You can't perform a different action on a subset of the records. To approve some records and reject others, you must make two API calls and pass the appropriate ActionType value in each call.
  • The approval process occurs in the context of the user who makes the request. Approval validations are run against that user (the msdyn_Approver field on the approval set).
  • As in the case f approvals that are done via the user interface (UI), approval sets are processed either synchronously or asynchronously, depending on the Background Approval Threshold value.