Crm 2011- Excluding a web resource if there is a resource

In our solution, we have custom .js files for several forms (account forms and some custom entity forms).

They work great with our developers.

When importing developer settings into our QA environment, we get account error messages and several (but not all) custom entity forms;

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

MSCRM Error Reporting: --------------------------------------------- ----- --------------------------------------------- ----- ---- Error: Could not find a web resource named account.js. error Number: 0x80040217 Error message: Could not find web resource with name account.js. Error details: Could not find 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 information: [CrmException: Could not find 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 of the context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () at System.Web.HttpApplication.ExecuteStep (step IExecutionSteplication.ExecuteStep (step IExecutionStep) Boolean

The custom script itself, however, loads and runs correctly.

Deleting / deleting custom scripts or re-importing the settings did not fix the problem.

Anyone have an idea?

+3


source to share


3 answers


It looks like you are trying to call a webresource named "account.js" which doesn't exist. If you are trying to call it from your settings file from some customRule in enableRule or something like that, you need to call it by name and not by its display name, for example, if the name is "new_ / scripts / account. Js, then your call should be:



$webresource:new_/scripts/account.js

      

+2


source


OK, well, I would post this as a comment ... but I am just starting to reply on the site and am lacking a "reputation".

I would like to ask if you use this form on standard forms or web resources?



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

+2


source


Can you view the url from the stack trace? For example, I encountered similar behavior on Feed Feeds and the problem was that I had an organization with Swedish as my base langugage and no English provided for the organization. Is your development environment set up the same as your production environment with languages?

Hello

Rickard

0


source







All Articles