Skip to content

Instantly share code, notes, and snippets.

@maestrotex
Created December 29, 2021 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maestrotex/cb0119ba58d004936eb213ab2c782790 to your computer and use it in GitHub Desktop.
Save maestrotex/cb0119ba58d004936eb213ab2c782790 to your computer and use it in GitHub Desktop.
function callFlow(executionContext)
{
var formContext = executionContext.getFormContext();
var accountName = formContext.getAttribute("name").getValue();
var email = formContext.getAttribute("emailaddress1").getValue();
var params = {
"Name":accountName,
"Email":email
}
var url = "https://prod-189.westus.logic.azure.com:443/workflows/75b05db9981e41d89a6887fff03c1fee/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=uGEet3rej2Z1xWu6GS-8WTPUF0sRnmRsGaXQGSpz1yw";
var req = new XMLHttpRequest();
req.open("POST", url, true);
req.setRequestHeader('Content-Type', 'application/json');
req.send(JSON.stringify(params));
Xrm.Utility.alertDialog("Flow initiated. The PDF will be sent soon.");
}
@maestrotex
Copy link
Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment