I'm attempting to run the code provided in this thread: Launch SharePoint 2013 Workflow w/Javascript
It's a function which starts a SP 2013 Workflow given input parameters of Item ID and Subscription ID.
I keep getting an error on this line:
var subscription = wfManager.getWorkflowSubscriptionService().getSubscription(subscriptionId);
I keep getting a TypeError error:
this.get_context is not a function
Any ideas?
I'm attempting to run this from a web part. I see that sp.js, sp.core.js, and sp.runtime.js all appear to load by default.
The only one which I had to load with a script tag is sp.workflowservices.js.
My startWorkflow() function runs upon clicking a link, so I don't think it's a matter of code executing before scripts are properly loaded.