Sonoma Partners Microsoft CRM and Salesforce Blog

CRM 2011 JavaScript Model Generator

Last month I released the CRM 2011 JavaScript Model Generator on CodePlex and received some great feedback and requests to provide multi-form capabilities and the ability to explicitly include certain attributes, tabs, sections, and left navs.

I am happy to announce that this functionality has been implemented in the latest version of the tool which you can find here -

Multi-form Capability

This can be accomplished by specifying the name of the form that you want to generate the JS model for (FormName attribute below). If you don’t specify the form name then it will just grab the first form retrieved for that entity.


If two separate forms for the same entity are needed then there would need to be two separate javascript files, one per form. The config would look something like this:


Explicitly Include Types

This can be accomplished by first setting parameters on the Entity node in the config to false. These parameters include:

  • IncludeAllAttributes
  • IncludeAllTabs
  • IncludeAllSections
  • IncludeAllLeftNavs

Secondly, nodes for each type would need to be added underneath the Entity node. The example below will only generate the model for the “Salutation”, “First Name”, and “Last Name” attributes, the “Address” section, the “General” tab, and the “Addresses” left nav link.


To generate all instances for each type, either set the respective “IncludeAll” setting to true or leave it out of the config.

That’s it for this release. Please keep the feedback coming, it has been extremely helpful!