Page 1 of 1

Click save button programmatically

Posted: 07 Sep 2015
by SPTech
Hello,

I'm using SP.ClientContext.executeQueryAsync to get data from other list and according to the result I would like to allow user to save or not save the edit form. Because this function runs asynchronously I can not use the code in fd.onsubmit(). I use another button to use executeQueryAsync function and in that code I would like to trigger save button programmatically. Is it possible ?

Re: Click save button programmatically

Posted: 07 Sep 2015
by rostislav
Please use:

Code: Select all

fd.save().click();

Re: Click save button programmatically

Posted: 07 Sep 2015
by SPTech
Great, thanks.