2
1
0

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?

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hi Patrick,

      You can find the status in the Txn object is you are using fluent, formStatus saved or userSaved.

      Also  from Submission object: isFormSaved()

      Regards,

      Julio.

      1. Patrick McPhan

        Thanks Julio, I'll rewrite the script for fluent, seems like the best way.

      CommentAdd your comment...
    2.  
      1
      0
      -1

      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.

      Any ideas?

        CommentAdd your comment...