Skip to main content

Notifications

How to access action output in Logic Apps

 If you are working on Logic App to integrate Microsoft Dynamics 365 Business Central with any other third party application, by now most probably you must have used HTTP requests or custom connectors (mainly with SOAP web services). 

I saw a couple questions in the forum asking how to access action output in Logic App. 

Below JSON is copied from an action output:
 {  
"Soap:Envelope": {
"@xmlns:Soap": "http://schemas.xmlsoap.org/soap/envelope/",
"Soap:Body": {
"isPostingPeriodOpen_Result": {
"@xmlns": "urn:microsoft-dynamics-schemas/codeunit/GenJnlPost",
"return_value": "false"
}
}
}
}

What if you want to read the "return_value" field of the action output? You can use any of the below statements based on your requirement. 
  • Below statement will return the actual value or if the value is empty it will return ''
 {ActionOutputs('Compose_isPostingAllowed')?['Soap:Envelope']?['Soap:Body']?['isPostingPeriodOpen_Result']?['return_value']}   
  • Below statement will return the actual value or if the value is empty it will return null
 ActionOutputs('Compose_isPostingAllowed')['Soap:Envelope']['Soap:Body']['isPostingPeriodOpen_Result']['return_value']  

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

This was originally posted here.

Comments

*This post is locked for comments