Hi.
(Dynamics CRM 2011 on-premise pt-br)
I've seen that one time but I dont find the solution again :-//
I need to close the entity form without user authorization or interaction (Xrm.Page.ui.close()).
If exists unsaved changes the CRM prompt the user if he really want to close without saving, but I want to prevent this dialog.
Exists 2 warning dialogs types the crm show for that:
- confirm() javascript dialog "exists unsaved changes....do you want to close without saving?" Yes / No
- A new crm window asking the user to choose between 2 options "save changes..." or "discard changes...". Yes/No
I want to close the window without any prompt or user interaction.
Ideas:
- Call some function on every attribute the system changes to force the crm to not ask user for saving if he close the window
- Call some function to prevent the dialog to show independent of any attributes change
Someone know how to implement this ideas or other idea for similar purpose?
(Instant idea: I will try to overload onbeforeunload event on window object or assign null to it, but I have not IE in this pc for test that now, I will report my test result)
Thank you!
-- Christophe Trevisani Chavey www.notafiscaldeservicos.com.br www.virtualgroup.com.br