Ok so I'm in a function on a beforeUpdate event and I have it set so that it cancels the event in case of duplicates. The problem im having is that if they navigate away from the page via that button it will continue to leave the form. How do i cancel that event as well ONLY if there is a duplicate?