Below is some sample code to delete a workflow on the host web from your app web. This would be useful in the event you want your App to remove a workflow that you have deployed to the host web.

NOTE: you must include a reference to “/_layouts/15/SP.WorkflowServices.js”

Comments
  • arash
    Posted at 5:29 pm June 26, 2014
    arash
    Reply
    Author

    Hi Thomas. Thank you so much for the WF javascript. It took me whole day and once I used yours it worked like a charm. The issue I had was i was calling executequery on the hostwebcontext instead and once I use app web context to call it it worked.

    Again Thanks for this nice article.

    Arash

    • Thomas Daly
      Posted at 6:03 pm June 26, 2014
      Thomas Daly
      Reply
      Author

      That’s why I posted it 🙂 I struggled for a day or so trying to figure out why I was getting access denied with the calls. The documentation on it is not 100% yet.

      Glad this helped!

  • Leave a Reply