I'm working to set-up the PreSaveItem() on an edit form for a list such that it evaluates parameters from the query string, and some list fields to execute workflows based on various criteria.
Based on what I found from a previous question I was planning to migrate the workflow start code to the edit form and re-use the startWorkflow(itemID, subID) function. However when I add the script tag:
<script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
Any attempt to save a list item from the edit form is met with:
Column '' does not exist. It may have been deleted by another user. {relative path to list}
This blocks saving entirely. When I comment out the tag, the error goes away, but the workflow start function throws an error when attempting to execute the workflow:
Error in {Workflow Name} workflow: Unexpected response from the server. The status code of the response is '0'. The status text of response is ''.
Despite this error, the workflow fires off and performs as expected. While I'm tempted to silence the error message and call this done, I'd rather have a real solution.
Any tips? The startWorkflow(itemID, subID) functions as expected on the display page.
Thanks.