Having problems with managing numerous web resources within you Dynamics CRM Environment or wanting to upload multiple web resources at the same time? The Dynamics CRM SDK has provided help by using the Web Resource Utility which is easily found in the latest Dynamics CRM SDK. Follow the steps below to know how to use it.

 

Download the latest Dynamics CRM SDK

  1. Download the Microsoft Dynamics CRM SDK 2016 from this link. Select the .exe and click Next.

crm 2016 sdk

  1. Extract the downloaded Dynamics CRM SDK 2016. On this post, it was extracted to C:\CRMSDK2016. The following steps assume that you have extracted on the same folder.

 

Build the Web Resource Utility Solution

  1. Within the CRMSDK2016 folder, navigate to the following path: SDK\Tools\WebResourceUtility.
  2. Open the WebResourceUtility.sln and Build the Solution.
  3. Navigate to \SDK\Tools\WebResourceUtility\bin\Debug and open the WebResourceUtility.exe.

 

Connect to Dynamics CRM Organization

  1. Click New.
  2. Populate the fields required to connect to your Dynamics CRM Organization. For Dynamics CRM Online instances, leave the Domain field blank.

crmmm organization

  • Name – This is how you would want to name your connection.
  • Organization – This could be seen within your CRM Organization. Navigate to Settings > Customizations > Developer Resources. Within the Connect your apps to this instance of Dynamics CRM section, under the Instance Reference Information, you are able to see the Unique Name field value which would be entered in the Organization field.

instant web api

  • Username – This is your login credential used to access the Dynamics CRM Organization.
  1. Click Connect.
  2. Prompt to enter your Password would appear. Enter the password used to login to your CRM Organization.

password

  1. In case you encounter the Error prompt as seen below, there are additional steps required.

additional steps required

  1. Close your currently running Web Resource Upload Utility.
  2. Open the WebResourceUtility.sln found within the SDK\Tools\WebResourceUtility folder.
  3. Navigate to the ConsolelessServerConnection.cs.

solution explorer

  1. Within the GetServerConfiguration method, update the code as seen below:

From:

To:

 

public virtual

  1. Rebuild the solution and re-open the application from the bin folder.
  2. Try re-connecting to your Dynamics CRM Organization.

 

Choose the Dynamics CRM Solution

  1. Within the Choose a Dynamics CRM Unmanaged Solution screen, choose the solution where you would want to connect/import your web resources.

unmanaged solution

  1. Click Choose.

 

Load Packages

  1. The next screen would the where you would be asked to load either existing packages or create new packages as seen on the image below.

web resource utility

  1. For demonstration purposes, I created a local folder which contains 12 images which I would want to import as a package.

demonstration purposes

  1. Click New Package.
  2. Populate the Package Name.
  3. On the Root Path field, click on Browse to point to the path of your local folder which contains the web resources you would want to upload.

root path

  1. Highlight all or select specific files from the list, then click Add Files to Web Resource.

add files to web resources

  1. Notice that the selected web resources would then be loaded on the Web Resources section. On top of the list, the prefix you have assigned on the Package Name is displayed.

remove web resources

  1. Tick on the Publish all customizations after uploading web resources.
  2. Click Save Package for next time’s use.
  3. Click Upload All.

output screen

  1. Output screen would be displayed showing you the current updates of the files being processed.

hide output

  1. Note that Web Resources with spaces or hyphens on their name could not be uploaded. To avoid this, edit their names as displayed on the Web Resources section.

web resources section 2

web resources section

  1. Wait for a message similar to the the image below to signal completion of the upload.

done processing

 

View the Uploaded Web Resources

  1. Navigate to your Dynamics CRM Organization and proceed with opening your CRM Solution where you have mapped the tool.

view the uploaded resources

 

Conclusion

Rather than manually uploading each of the files, which would be prone to typographical errors, it would be easier to use this tool which would also help you save time and effort. This could as well handle multiple updates on your web resources which would also be tedious to do one by one on each of the existing records.

If you find this blog helpful, kindly share or comment below.