1
0
-1

I am using the following method:

Form.submit(type, legacyMethod, skipPostSubmit, validateItem, sendEmail, backgroundSave)

in the following way:

Form.submit("Saved", item.properties.legacyMethod, true, null, false);

 

I am trying to set sendEmail to false, but that is not working. I tried leaving it empty, but did not work too.

Note that my form has the auto-send confirmation email property as unticked.

Thanks.

 

  1. Stephanie Siao

    Just to be clearer, when the user initiates a save (i.e clicks on save), we want to send the email. But in some cases, when an error occurs due to API call failing for example, we display a generic error dialog/modal. When these modals are displayed, we want to auto save for the user, but not send the email. Hope that helps clear up our intention.

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    Hey Stephanie, I believe the function you are after is

    Note the implementation of this function calls:

    which is also working for me if I call it explicitly (i.e. saving the form without sending emails).

    I tried using false instead of null for the 5th parameter (sendEmail) and this worked also.

    I notice that you are missing the 6th parameter in your call to Form.submit (backgroundSave) which should be set to true.

    But unless there is an reason not to I suggest you use the Form.backgroundSave() function.

     

    1. Stephanie Siao

      Hey Ben, my initial thought was that background save worked differently from the usual foreground save. It makes it a lot easier if I can use background save instead. Thank you!

    CommentAdd your comment...