CRM 2011 Web Resources: Just getting started…

One of the most impressive things about the CRM2011 framework is the amount of customization that can be done right from the GUI of the application.  Considering we implemented CRM 4.0 only a couple of months before CRM2011 was initially released I am a bit disapointed at the amount of rework for some small modifications.  But making these modifications has submerged me in the customibilty of CRM 2011.

Start with going to Customizations under settings.

Once inside customizations look for Web Resources

Under web resources click the new button.  This will pop up a form that will allow you to add  your new web resource.

You can add multiple types of web references.  I am mostly interested in adding a JavaScript function right now.  It seems that for the “name” of the jScript files  you need to have the extension .js.  Also you can use / to organize special functions that you only want to use once and global functions you will use more than once.

Depending on the type of web resource you may get the text editer.  This allows you to write your code directly in GUI or you can upload a code file.  This option is going to be available for all of the “code” type web references, but not for images and things that would obviously have to have a physical file associated.

At the top of the form, notice the publish.  This just like all other cusotmizations funcitonaltiy with in CRM requires publishing.  Once published you can pull this into actions on forms and fields of your entities.

Now lets put it on a form

While in the Customizations screen look for Entities along the left menu.

Drop down the triangle till you have selected the entity you want to add the code file too and go to the Forms.

Once in the form click on “Form Properties”

Inside Form properties is where you add the file you added to the web Resource library to the form

In this case I added a js file called new_IframeEmail.js in the top panel.  This will make it avaialable inside the form to be assigned to field actions, tab actions or form actions.

In the bottom panel. You add the event handlers.  In this case I want the Iframe to load in the window “onload” of the form.    From this screen you could make this code activate on any of the fields in the form from an “onchange” state.  There are a number of states depending on the field you are selecting.

Now you can also add code and the event handlers by modifiying a selected element’s properties. This is an iFrame element here that I am using. 

From here you can add additional files from the library but instead of having every element avaialble to you for events you will only have the ones relevant to the element you are in the properties for.  You can change the order of how the code fires and you can edit it from both of these pages.  I do want to warn you again.  When you make changes to this file it will make changes to the master file.  So every instance of the file will be updated.

To make the changes appear you will need to save the form and then publish the changes, this will publish code changes as well as form changes.

I do also want to warn against over “eventizing” you code.  If you have code that seems to end up in an endless loop, look to see if you have it associated with multiple events in your form. This will cause the page to load slowly and can cause over-writing issues.

I will be moving into more advanced customization, but if you are looking to get started and add some simple functionalist to extend the CRM 2011 UI this should point you in the right direction.

About dorothyjarry

Super Dots
This entry was posted in CRM, CRM 2011, Customer Portal, Dynamics. Bookmark the permalink.

4 Responses to CRM 2011 Web Resources: Just getting started…

  1. Jon Winters says:

    Sorry to post here, but need to get in touch with you and I couldn’t find your contact info.

    Like

  2. I really like your writing style, fantastic info , thankyou for posting : D.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s