locked
Is this unsupported.............????? RRS feed

Answers

  • Sorry Adi, Hassan is right. It is only possible to access external JScript files by manipulating the DOM.

    Just look in the SDK:

    Customizations using the Microsoft Dynamics CRM SDK

    The Microsoft Dynamics CRM SDK, technical articles, and sample code published on the MSDN Web site (http://msdn.microsoft.com/mbs/default.aspx), and information released by the Microsoft Dynamics CRM Developer Support Team are included in the area of customizations using the Microsoft Dynamics CRM SDK. The specific actions and their levels of supportability and upgradeability are as follows:

    Form and Field Events (onChange, onLoad, and onSave). The ability to add custom logic to forms through the onChange event for all field types and onLoad and onSave form events is supported and upgradeable. However, the code inside the event and the way the event interacts with the Document Object Model (DOM), although mostly upgradeable, might not be supported. The structure of the forms and the elements on the forms could change in future releases. For more information, see Form Scripting.


    Best regards,
    Jürgen


    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Thursday, April 23, 2009 6:31 PM
    Moderator
  • Hi Mahain,
        
        The blog you refer to in your post rightly states the following:

    "Disclaimer:  You should only use this for development.  After you have tested your changes using this method you should copy the code back into the OnLoad and comment out the code that loads the JavaScript file.  Keeping the file in your OnLoad will save you time and headaches in deployment.  Plus, this is not supported."

    So yes you can use external js files but after development and testing is completed, script must be pasted into the appropriate event handler within MS CRM to achieve a "supportable state".

    H.

    Technical Consultant | http://hassanhussain.wordpress.com/
    Thursday, April 23, 2009 3:28 PM

All replies

  • It is supported and is the best approach if you don't need offline capabilities. Otherwise you must deploy the files on all clients or paste all script back to CRM.

     

    You can prepare you self for such an option by writing your function using the following notation:

     

    window.funcName = function()

    {

       //do something

    }


    http://mscrm4ever.blogspot.com/
    • Proposed as answer by Marco Ray._ Thursday, April 23, 2009 4:56 PM
    Thursday, April 23, 2009 3:21 PM
  • Hi Mahain,
        
        The blog you refer to in your post rightly states the following:

    "Disclaimer:  You should only use this for development.  After you have tested your changes using this method you should copy the code back into the OnLoad and comment out the code that loads the JavaScript file.  Keeping the file in your OnLoad will save you time and headaches in deployment.  Plus, this is not supported."

    So yes you can use external js files but after development and testing is completed, script must be pasted into the appropriate event handler within MS CRM to achieve a "supportable state".

    H.

    Technical Consultant | http://hassanhussain.wordpress.com/
    Thursday, April 23, 2009 3:28 PM
  • There is nothing unsupported about it. If you put your script files inside the ISV folder you can refer to them however you see fit. As I said, if you require offline capabilities you should paste the script back to CRM. 

     


    http://mscrm4ever.blogspot.com/
    Thursday, April 23, 2009 3:38 PM
  • Sorry Adi, Hassan is right. It is only possible to access external JScript files by manipulating the DOM.

    Just look in the SDK:

    Customizations using the Microsoft Dynamics CRM SDK

    The Microsoft Dynamics CRM SDK, technical articles, and sample code published on the MSDN Web site (http://msdn.microsoft.com/mbs/default.aspx), and information released by the Microsoft Dynamics CRM Developer Support Team are included in the area of customizations using the Microsoft Dynamics CRM SDK. The specific actions and their levels of supportability and upgradeability are as follows:

    Form and Field Events (onChange, onLoad, and onSave). The ability to add custom logic to forms through the onChange event for all field types and onLoad and onSave form events is supported and upgradeable. However, the code inside the event and the way the event interacts with the Document Object Model (DOM), although mostly upgradeable, might not be supported. The structure of the forms and the elements on the forms could change in future releases. For more information, see Form Scripting.


    Best regards,
    Jürgen


    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Thursday, April 23, 2009 6:31 PM
    Moderator
  • Microsoft’s statement regarding this issue is clear. If you make changes to DOM elements and future upgrades are unsuccessful because of these changes then your customizations are considered unsupported. The addition of a script element to the head tag by it self can break future upgrades. The content of your script might. This is also true for any other script manipulation you make that does not influence CRM DOM structure in a way that breaks you ability to turn to ms for help.

     

    When you write client side script you should always ask your self if what you wrote might be broken by future rollups or versions. As a thumb rule, if you make manipulations that are not CRM specific, for example changing the document.title = “to some other text”; then your code is probably supported.

     

    If anybody else cares to comment I’ll be happy to here your thoughts about this issue.

     

     

     

     


    http://mscrm4ever.blogspot.com/
    Thursday, April 23, 2009 8:23 PM
  • Hi Adi,

       Microsoft's official statement on this is that "Microsoft Dynamics CRM support does not support the technique of using external files in the development and testing.
    Any coding done in this manner, and not moved into each form or field where it is executed is unsupported and will not work with the Outlook client when it is offline."

    So ANY external js references, even if the file is in ISV folder must be pasted to the relevent event before deployment on the production server for the server to be supported by MS.

    Hassan





    Technical Consultant | http://hassanhussain.wordpress.com/
    Thursday, April 23, 2009 10:43 PM
  • Hi Hassan,

    I was not aware of that. The SDK clearly states what is unsupported under “Unsupported Customization” topic. I could not find any reference that supports your statement / quotation.  


    http://mscrm4ever.blogspot.com/
    Thursday, April 23, 2009 11:36 PM

  • I've just had very close read of the page and you are right. Somebody has missed to list it there.

    That quote in my post is from the Microsoft Official Training Materials for Microsoft Dynamics CRM.

    Hassan.

    Technical Consultant | http://hassanhussain.wordpress.com/
    Friday, April 24, 2009 10:01 AM