- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 08:46 PM
Hi,
I cloned form widget and keeps getting this leave site alert when I'm trying to click on save button of the form.
Any suggestions to get rid of this alert?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2020 08:39 AM
Hi,
on form we can get to know which fields got changed. but that is difficult on portal
can you try this just before navigation
window.onbeforeunload = function () {
// blank function do nothing
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2020 01:15 AM
You are welcome
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2020 01:40 PM
Ankur,
I found the issue and it is related to location.href which I have added to redirect after inserting record.
How can redirect without alert showing up?
$scope.$on("spModel.uiActionComplete", function(evt, response) {
$scope.submitting = false;
if (response.isActionAborted)
return;
var sysID = (response.isInsert) ? response.sys_id : $scope.data.sys_id;
location.href = '/tatm?id=tatmhome&confirmSysID=' + sysID;
loadForm($scope.data.table, sysID).then(constructResponseHandler(response));
});
Thanks,
Ashraf