0
votes

We're running Microsoft Dynamics CRM 4.0, and setting up custom JavaScript event handlers on several of our forms.

I'd like this JavaScript code to be kept under revision control, but I'm not aware of any way of deploying changes to these scripts, other than manually editing (or copy/pasting) the code in the Dynamics CRM entity customisation forms - which means it would be all too easy for someone to make changes to the running system and 'forget' to copy/paste their changes into the revision-controlled version.

I'm wondering if we can use something like a trigger or a FileSystemWatcher component to catch changes to these files and make sure they're stored in revision control - but I have no idea where to find the actual raw scripts. Are they stored somewhere in the MSCRM_CONFIG or MyCompany_MSCRM databases? Or on disk somewhere on the CRM server itself?

Thanks!

2

2 Answers

1
votes

It's basically included in the FormXML which is the definition of all forms in your environment. It is stored as part of the organizationui.

See also http://social.microsoft.com/Forums/en-US/aaa6f404-81eb-467d-b9bb-3d29108ec92b/where-does-crm-40-javascript-code-get-stored-in-database

0
votes

The JavaScript is stored inside the database, I can't find the exact table for CRM 4.0 (here an article about CRM 2011 location just for your information http://kellyhoang.blogspot.com/2012/01/crm-2011-customization-decript-default.html)

There is also a tool for extracting the JavaScript from a CRM 4.0 instance, you can find it here: http://blogs.infinite-x.net/2011/09/30/export-javascript-crm-4-0-updated/

(you can decompile it to look how it works, or ask the author directly)