crm 2011- Web resource not found exception when resource exists

3

In our solution we have custom .js files for several forms (account form and some custom entities' forms).

They work fine on our dev environment.

When importing the dev customizations to our QA environment, we receive error messages on the account, and several (but not all) of the custom entities' forms;

When viewing the trace log on the crm server, we see the following exception:

MSCRM Error Report: -------------------------------------------------------------------------------------------------------- Error: Could not find a web resource with name account.js. Error Number: 0x80040217 Error Message: Could not find a web resource with name account.js. Error Details: Could not find a web resource with name account.js. Source File: Not available Line Number: Not available Request URL: https://server:444/Handlers/WebResource.ashx?name=account.js&ver=935169123 Stack Trace Info: [CrmException: Could not find a web resource with name account.js.] at Microsoft.Crm.Application.Components.Handlers.WebResource.RetrieveWebResource(String webResourceName, String preview) at Microsoft.Crm.Application.Components.Handlers.WebResource.ProcessRequestInternal(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The custom script itself, however, is loaded and works correctly.

Removing / deleting the custom scripts or re-importing the customizations have not fixed this issue.

Anyone got any idea?

dynamics-crm-2011
asked on Stack Overflow Feb 7, 2013 by J. Ed

3 Answers

2

ok, well, I'd to have posted this as a comment...but I'm only starting to respond on the site and lack the "reputation".

What I'd like to ask is, are you using this form on standard forms or web resources?

In your solution, are you calling the JS one thing on the calling page and something else in your solution? for example new_\js\account.js vs new_account.js ?

answered on Stack Overflow Feb 7, 2013 by Mike_Matthews_II
2

Looks like you are trying to call a webresource by the name "account.js" that doesnt exist. If you are trying to call it from your customizations file from some customRule in enableRule or something like that, then you need to call it by its name and not by its display name, for instance if the name is "new_/scripts/account.js then your call should be:

$webresource:new_/scripts/account.js
answered on Stack Overflow Feb 13, 2013 by Greg Oks
0

Can you surf to the URL from the stack trace? I have encountered similar behaviour on Activity Feeds for example and the problem that time was that I had an organization provided with Swedish as base langugage and no english provided for the organization. Is your dev environment set up identically to you production environment with languages?

Regards

Rickard

answered on Stack Overflow Feb 11, 2013 by Rickard N

User contributions licensed under CC BY-SA 3.0