Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

How to prevent unsaved modification dialog on closing entity form ? CRM 2011

$
0
0

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:

  1. confirm() javascript dialog "exists unsaved changes....do you want to close without saving?" Yes  /  No
  2. 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:

  1. Call some function on every attribute the system changes to force the crm to not ask user for saving if he close the window
  2. 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




Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>