Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Calling a function on commit

$
0
0
Marc

Something that has had me scratching my head for a day or so; How would I do a callback when committing a data form?

Here's the scenario:
User edits a list item in a custom form. User clicks commit form action button which saves the record and then calls a function to fire a workflow.

I'm using SPServices to call the workflow as I don't want the initiation form displayed (I use the initiation parameters to determine what action a workflow should take (e.g. mark item as cancelled, postponed etc) which I pass in at runtime via JavaScript. my approach is to make the workflow act like a case statement as I can handle multiple scenarios in a single workflow.

It works beautifully where a user doesn't need to edit any data beforehand (e.g open an item then click postpone).

Any thoughts on the approach?

Regards

Martin

Viewing all articles
Browse latest Browse all 6517


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>