PreSave function in Custom JS not completing for all users

Home Forums Classic DFFS PreSave function in Custom JS not completing for all users

Viewing 1 reply thread
  • Author
    Posts
    • #37019
      Jon Whisman
      Participant

        Hi!

        I have all of my code in Custom JS. No DFFS back-end rules at all.

        In my Custom JS dffs_PreSaveAction function, I notice the below.

        For me (site collection admin): All code in the dffs_PreSaveAction completes for me.

        For other users: Some of the code in the lower portion of my dffs_PreSaveAction does NOT complete before the form is saved.

        Seems the save is occurring but all the code in the dffs_PreSaveAction has not yet completed?

        Is there a way to make sure that all code in the dffs_PreSaveAction is executed and COMPLETED before the actual save occurs?

      • #37021
        Alexander Bautz
        Keymaster

          Hi,
          What kind of code are you running in the function? If you use any kind if async code you must have the presave action function return false to stop the save – letting the async code complete – and then trigger a new save after the code has finished (skipping over the async code on the next save).

          Alexander

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.