Hi,
I am using Xrm.Navigation.navigateTo method to open the main form from the contact form. If I use the save and close button in a modal( please see the image below).

The modal window closes perfectly, but if I refresh the parent page(contact) after this, it reloads to the new record created from the Modal. this issue is not there if I use the close icon in the modal. Has anyone experienced this issue?
following is the js code open the modal.
function loadDialogForm(executionContext) {
formContext = executionContext.getFormContext();
var pageInput = {
pageType: "entityrecord",
entityName: "nj_dialoguebatchone"
};
var navigationOptions = {
target: 2,
height: {value: 70, unit:"%"},
width: {value: 35, unit:"%"},
position: 1
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
function success(result) {
//console.log("Record created with ID: " result.savedEntityReference[0].id
//" Name: " result.savedEntityReference[0].name)
// Handle dialog closed
},
function error() {
// Handle errors
}
);
}
Many thanks
nijo