Basically, trying to execute an on-demand workflow when a button is clicked.
HTML
JS
There are a couple issues I've run into:
- Passing executionContext as a parameter in the HTML results in undefined
- Removing it does call the JS function, but then executionContext is still undefined--need to pass executionContext as first parameter
- Add the JS to the form properties under Form Libraries and then under Event Handlers so I can add the "pass executionContext as first paramater"--this results in "Cannot read property 'getFormContext' of undefined"
- Also, the HTML web resource doesn't show as Control under Event Handlers, so it is currenly OnLoad which causes an error when the form loads
So how should I be setting this up?