Submission preprocessors will fire on submit and save, how can I determine in my script if form is being save or submitted, so I can ensure it only runs on submit?
You can find the status in the Txn object is you are using fluent, formStatus saved or userSaved.
Also from Submission object: isFormSaved()
Thanks Julio, I'll rewrite the script for fluent, seems like the best way.
So I have written the script and the form status is always Saved or Opened, even on submit (presumably because at the time the preprocessor is being called it isn't submitted yet.). userSaved is true for used saves, but this for has background save so that's not useful. Also looking at the request 'sfmOperationName' is always backgroundSave, even on submit. So I am having trouble actually determining when it is a submit or not.