locked
Javascript CRM 2011 event.Mode dose not work RRS feed

  • Question

  • We just updated our testserver to crm 2011 RU12 and I'm getting a lot of errors.
    One of the more annoying this is that event.Mode has stopped workling!?

    I have some scripts that check the save method, if it’s save, save and close or resolve and I’m using event.Mode == 5 to run some scripts on resolve. This worked before the update. Is this not supported anymore?
    Monday, October 21, 2013 8:51 AM

Answers

  • Please check this

    http://msdn.microsoft.com/en-us/library/gg509060.aspx#BKMK_GetSaveMode

    function preventAutoSave(econtext) {

        var eventArgs = econtext.getEventArgs();

        if (eventArgs.getSaveMode() == 1) {

            // TO DO

        }

    }



    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !


    • Edited by _Vikram Monday, October 21, 2013 9:11 AM
    • Marked as answer by HalSoul Monday, October 21, 2013 9:45 AM
    Monday, October 21, 2013 9:10 AM

All replies

  • Please check this

    http://msdn.microsoft.com/en-us/library/gg509060.aspx#BKMK_GetSaveMode

    function preventAutoSave(econtext) {

        var eventArgs = econtext.getEventArgs();

        if (eventArgs.getSaveMode() == 1) {

            // TO DO

        }

    }



    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !


    • Edited by _Vikram Monday, October 21, 2013 9:11 AM
    • Marked as answer by HalSoul Monday, October 21, 2013 9:45 AM
    Monday, October 21, 2013 9:10 AM
  • Thanks! This works =)
    Monday, October 21, 2013 9:45 AM