Below is Demonstrated in below part
Create Power automate Flow to receive HTTPS Request from Javascript and send Email
Register Javascript
Creating a Ribbon Button on Contact Entity and add javascript action to the button Command and pass PrimaryControl
The post Execute Microsoft Power Automate from Ribbon using JavaScript – On demand Power automate flow using Javascript – in UCI – Replace RibbonAction.js appeared first on Microsoft Dynamics 365 Blog.
]]>Please go through Referred Ajit’s Blog for more detail, where he explained how to Execute PowerAutomate on click of a button on the Lead record
Below is Demonstrated in below part
We will create Power automate flow with the trigger “When an HTTP request is received” this will provide us an URL which we will use in our js for execution.
Below are the steps Performed
Schema generated are available in Actions to be used as dynamic Values
We will create a simple JS web resource and will use below Javascript Provided by Ajit on his blog: Click Here
function executeRequest(executionContext) { var formContext = executionContext.getFormContext(); var flowUrl = "Http Post URL"; var input = JSON.stringify({ "contactid": formContext .data.entity.getId().replace("{", "").replace("}", "") }); var req = new XMLHttpRequest(); req.open("POST", flowUrl, true); req.setRequestHeader('Content-Type', 'application/json'); req.send(input); }
function executeRequest(executionContext) { var formContext = executionContext.getFormContext(); var flowUrl = "Http Post URL"; --------------------------------------------- --------------------------- --------------------------------------------
Thanks
The post Execute Microsoft Power Automate from Ribbon using JavaScript – On demand Power automate flow using Javascript – in UCI – Replace RibbonAction.js appeared first on Microsoft Dynamics 365 Blog.
]]>