Create a New Web Resource.

To create a new web resource simply create a new file in Visual Studio that corresponds with the type of web resource that you would like. For purposes of this document we will be using a JavaScript file.

We have added a JavaScript file to our project and placed it in the following folder:

Notice that we have placed the file in a sub-folder called 'new_'. This corresponds with the prefix for the publisher of our current solution. By doing so, when we create the file in CRM, XrmToolkit will suggest the proper web resource name as you will see further down in this document.

Right-clicking on our JavaScript file in the Visual Studio Solution Explorer window shows the following menu:

Pressing the 'Add JavaScript file to CRM' button invokes the following window:

Note:
If your solution is not yet linked to a CRM Organization then you will be prompted to go through the wizard that will link the two together.
  1. We can choose to create a new web resource or link to an existing web resource.
  2. If 'New File' is chosen, then we can select which solution to add the file to. If 'Existing File' is chosen, we can select which solution to look for a file to link our local file to in CRM.

Pressing the 'Next' button gives us the following page:

  1. Name - Name of the file in CRM.
    Naming Convention:
    XrmToolkit will try to suggest an appropriate name based on the relative folder structure of the file in your Visual Studio project.
  2. Display Name - This is the Display Name of the web resource in CRM.
  3. Customizable - Sets the 'Is Customizable' managed property in CRM for the web resource.
  4. Minify on Publish - Controls when a JavaScript or CSS file is minified when publishing to CRM. For more information see the documentation found here.
  5. Description - Description of the web resource in CRM.

Pressing the 'Finish' button will create the web resource in CRM.

Additional Reading:
To learn more about the different actions available to a file linked to CRM see the documentation here.