Hello,
I am having an issue with Power Automate. When an opportunity in D365 is closed as won, I want a Project record to automatically be created, Project is a custom entity. The flow runs successfully, however when I check the raw outputs for the run history all the components seem to capture that the opportunity has been won, I have verified this as I see statuscode = 3 (being the Status Reason field in D365). I have also tried using statecode (Status) where 1 is the equivalent of WON.
However, the final Condition component is constantly being skipped, the data output gives a false result "expressionResult": false. Every component before the condition including the trigger captures the statuscode as 3 so the flow is working as it should do. I have tried many different expressions to get the condition to work, I have even tried converting the status code to a string just in case this was causing the issue using the formula string(triggerOutputs()?['body/statuscode']) followed by: is equal to, followed by ‘3’.
Can anybody help with the formula to get the statuscode to be recognised in the Condition. FYI, I have included the Compose component before the Condition and it is as expected, the data output for it is 3, so this indicates that the trigger is working correctly.
Thank you