I have a form which has been running and used for over a year now. Now out of a sudden and without having made any changes the fd.spSaved event behaves differently now.
in the newForm i have this:
function NewFormAfterSave() { fd.spSaved(function (result) { CreateTemplateTasks(selectedChannels, result.Id); }); }
the called method is like this:
function CreateTemplateTasks(selectedChannels, themaId) { // Get Template Tasks $.when(GetTemplateTasks()).then(function (templateTasks) { // Create Tasks var promises = []; $.each(templateTasks, function (index1, templateTask) { $.each(selectedChannels, function (index2, selectedChannel) { if (SelectedChannelHasTemplateTasks(selectedChannel.Id, templateTask.ChannelId)) { promises.push(new Promise(function (resolve, reject) { $.when(CreateTask(themaId, templateTask.Title, selectedChannel.Id)).then(function () { resolve(); }, reject); })); } }); }); Promise.all(promises).then(function () { if (fd.formType == 'New') RedirectToEditForm(themaId); else RefreshTasksTable(); }); });
the method gets called - but the form doesnt wait anymore and redirects to the page where you came from.
what it should actually do (and what it did for a year) is to create some elements in another list and redirect to the edit form of the just created item.
idk why that isn't working anymore, while also having made no changes whatsoever.