Created
December 29, 2021 06:18
-
-
Save maestrotex/cb0119ba58d004936eb213ab2c782790 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok