i have written the below code where once user save the dynamics 365 form, alert will pop up and will be there for 3 seconds and without clicking on "Ok:" the page will navigate back
But i want it to stay for 15 seconds or either when users clicks on "OK" it should navigate back
showFormNotification: function (executioncontext) {
var formContext = executioncontext.getFormContext();
var uniqueIdForInfo = "Shownotification101";
var displayTime = 15000;
var alertOptions = { height: 120, width: 260 };
var alertStrings = { confirmButtonLabel: "", text: "Your Assessment Request has been successfully raised !!", title: "Confirmation" };
if (formContext !== null) {
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
function () {
window.setTimeout( formContext.ui.clearFormNotification(uniqueIdForInfo),15000);
},
displayTime
);
}
Please let me know what code i need to add here