Reputation: 334
When i open an opportunity form and from there i have opened an opportunity product, but when i comes back to project and click on save and close it returns back me to opportunity product page (which i have opened last) instead of opportunity list page.
So, i have make custom function on save and close button and write code as following :
function SaveAndClose()
{
Xrm.Page.data.entity.save("saveandclose")
}
but issue remain same.
Please anyonve can you help me out on this?
Upvotes: 1
Views: 1915
Reputation: 334
I have fixed issue by following code:
function SaveAndClose()
{
Xrm.Page.data.entity.save();
if (parent.opener != undefined)
{
window.parent.close();
}
else
Xrm.Page.ui.close();
}
Hope this help !!!!
Upvotes: 1