Reputation: 23
For the needs of a customer, I need to automatically approve created TimeEntry records in Project and Operations (PowerApps). I tried to create a PowerAutomate according to the documentation (using the msdyn_ProcessProjectApprovalSets action), which should start the approval process, but the process ends with an error that appears to be an error within the action itself. I also tried to "bypass" the approval process and set the records to "approved", but then the time spent on the project (effort) is more or less randomly added.
action called (xml)
{
"inputs": {
"host": {
"connectionName": "shared_commondataserviceforapps_1",
"operationId": "PerformUnboundAction",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps"
},
"parameters": {
"actionName": "msdyn_ProcessProjectApprovalSets",
"item/ProjectApprovals": "@variables('projectApproverList')",
"item/ActionType": 192350003,
"item/NoteLogName": "Auto approve"
},
"authentication": "@parameters('$authentication')"
},
"metadata": {
"operationMetadataId": "8c72a17c-4816-4514-b958-65501c197db1"
}
}
variable projectAprovalList looks like
[{"@data.type": "Microsoft.Dynamics.CRM.msdyn_projectapproval", "msdyn_projectapprovalid": <GUID>}]
produce (confusing?) ERROR
Microsoft.Crm.CrmException: Invalid property 'id' was found in entity 'Microsoft.Dynamics.CRM.crmbaseentity'
I found somewhere similar behavior when calling from JS, where the solution was some kind of context change(?). But I have no idea how to do something similar in PowerAutomate.
Any ideas? Or am I doing something wrong?
Upvotes: 0
Views: 11