web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Hosk's Dynamic CRM Blog / CRM 2011 – Tool – JavaScri...

CRM 2011 – Tool – JavaScript Model Generator

Hosk Profile Picture Hosk

I like to see what useful tools are being created  and there have been some fantastic ones, my favourite is the sitemapeditor

I have been writing some Javascript recently and it’s always a bit of a hassle having to look up all of the  names of the fields you want to use.

In CRM 4 there use to be an excellent tool which created some intellisense for you but I haven’t found anything which is really useful for CRM 2011.

so it is with some interest I saw a tweet from CRM MVP Donna Edwards about a Javascript model generator.  The project is available on codeplex and you can download it using the link below

http://crmjsmodelgenerator.codeplex.com/

Now it took me a while to work out how to get this working, these are the instructions

How to generate it:

NOTE – Make sure your javascript file changes are saved before generating the model as your unsaved changes will get overwritten.

  1. Edit the provided sample.jsconfig file.
  2. Update CrmServer to use the correct server and org.
  3. Set the JsDirectory to be the folder where your script files are located.
  4. Add an Entity node for the entity form that you will be working on
    • EntityName is required and needs to be the schema name
    • FileName is optional and it will try to use the EntityName + “.js” to find the javascript file in the JsDirectory. Use this if the file name is different than the EntityName
  5. Run the JSModelGenerator.exe

<JsConfig CrmServer=”http://server/org”
JsDirectory=”C:\Source\Project\Scripts”>
<Entities>
<Entity EntityName=”contact” FileName=”contact.js” />
</Entities>
</JsConfig>

I changed the config file but then I was running it and nothing was really happening.  What you have to do is copy specify where the downloaded javascript files are on your computer and then it will update those files and add in the intellisense code to the file.

I quite like this solution because I can now quickly find all the fields on a form and it’s quick and easy to run

 

 

 



Filed under: CRM 2011, Development, Javascript, JScript

This was originally posted here.

Comments

*This post is locked for comments