Form save not firing from JavaScript RRS feed

  • Question

  • Hi Everyone,

    I want to achieve the following:

    - When the user clicks the save&close button on an activity, a custom dialog box will appear

    - Based on the values provided in the dialog, the current activity will be closed (the window will also close), and a new activity will be created. The trick part is that the changes on the current activity needs to be submitted before all this happens

    I created a function on form save, which prevents the save if the savemode is equal to save and close. Then I display my custom form. The return value of the custom form calls entity save, then it calls a custom AJAX call to close the current activity. If the call succeeds, I close the window.

    My problem is that the form does not seem to be saving the values before the AJAX call. Is it possible that the save event happens later on the server than the AJAX call? If there is a better way to achieve this, please let me know. It is a 2011 on-prem deployment btw.



    Thursday, December 3, 2015 10:39 AM


  • I decided to pass in the changed values as parameters in the ajax call and do the update on the WCF service. It turned out to be more reliable this way. 
    • Marked as answer by Adam Borsik Monday, April 11, 2016 1:30 PM
    Monday, April 11, 2016 1:30 PM