Answered by:
How to avoid dialog displayed when Xrm.Page.ui.close() is called?

Question
-
Hi,
How to avoid dialog displayed when Xrm.Page.ui.close() is called? When Xrm.Page.ui.close() is called a prompt is displayed to whether save or cancel the changes. I want to forcefully close the form without saving the changes. How can do this?
I have tried with the below satement after close statement, but no luck, any help greatly appriciated!!
Xrm.Page.ui.detachCloseAlert()
- Edited by Srikanth_MSCRM Thursday, October 4, 2012 6:41 PM
- Moved by Andrii ButenkoMVP, Moderator Thursday, October 4, 2012 7:08 PM (From:CRM)
Thursday, October 4, 2012 6:04 PM
Answers
-
Hi,
maybe you can do this by setting all fields on the form to setSubmitMode("never").
Greetings,
Pavlos
Please mark this reply as answer if it helps you find a resolution to your problem.
- Marked as answer by Andrii ButenkoMVP, Moderator Friday, October 5, 2012 7:05 AM
Thursday, October 4, 2012 7:13 PM -
Hi,
Here are two articles which will help you perhaps:
http://madcomputerist.blogspot.co.at/2012/03/forcesubmit-vs-setsubmitmode-in-crm.html
http://mahenderpal.wordpress.com/2011/07/01/close-ms-crm-2011-form-using-js/
Best regards,
Andreas
Andreas Buchinger
Microsoft Dynamics Certified Technology Specialist
MCPD: SharePoint Developer 2010- Marked as answer by Andrii ButenkoMVP, Moderator Friday, October 5, 2012 7:05 AM
Friday, October 5, 2012 6:50 AM
All replies
-
Hi,
maybe you can do this by setting all fields on the form to setSubmitMode("never").
Greetings,
Pavlos
Please mark this reply as answer if it helps you find a resolution to your problem.
- Marked as answer by Andrii ButenkoMVP, Moderator Friday, October 5, 2012 7:05 AM
Thursday, October 4, 2012 7:13 PM -
Hi,
Here are two articles which will help you perhaps:
http://madcomputerist.blogspot.co.at/2012/03/forcesubmit-vs-setsubmitmode-in-crm.html
http://mahenderpal.wordpress.com/2011/07/01/close-ms-crm-2011-form-using-js/
Best regards,
Andreas
Andreas Buchinger
Microsoft Dynamics Certified Technology Specialist
MCPD: SharePoint Developer 2010- Marked as answer by Andrii ButenkoMVP, Moderator Friday, October 5, 2012 7:05 AM
Friday, October 5, 2012 6:50 AM