web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Failed to load resource: the server responded with a status of 404

(0) ShareShare
ReportReport
Posted on by 1,457

Up till now I was hard-coding the labels. I decided that I start to have enough custom that I need to make use of the resources file.

I followed these steps on how to add a resource file:

https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/pos-view-extension

Under my main custom extension, I created a folder Resources, a folder under it called Strings, a folder under Strings called en-US and then the file: resources.resjson, The latter was created by selecting to add a new item, then I chose under Visual C# Items, the Resources File, file type and just renamed it to be of type: resjson. 

I hope I did it correctly because the above link is not very clear about that one.

I also added the file to my manifest.json:

pastedimage1584996102291v1.png

However when I run cloudPOS with Google Chrome and look in Developer Tools, I see the error:Failed to load resource: the server responded with a status of 404

If I remove my Resources file out of the manifest.json file, then the error goes away. So how do I add my Resources file? Can there be only 1 Resources file? We have another Resources file belonging to another ISV but they have their own manifest.json file.

For a view the columns labels show as the string-id instead of the value assigned to the string_id.

Also, although all the Microsoft examples show the label id's as "String_1" for example, the "string_1" is hard-coded. To prevent my labels to be confused with that of another ISV's  resources file id's I named mine "tmc_1" for example. Is there a rule that it absolute has to start with "string"? Below is an example from the above link showing it is just a hard-coded value. So I can only assume that it can be anything s long as it is in the Resources-file.

pastedimage1584996932265v2.png

So how can I get it to see my Resources file?

Any help is much appreciated

 

I have the same question (0)
  • Suggested answer
    ToddB Profile Picture
    on at

    Hi Retha,

    In checking on this, here is what I found:

    The 404 would be a file not found, so it seems like the new resources.resjson being created cannot be found.

    It is not clear if you are running the project from Visual Studio, or if testing from a deployed instance. 

    In the debugging tools of the browser, can you tell the path to the file it is trying to find? 

    Can you check the location to see if it there?

    NOTE: If this is in a managed environment, you may want to open a support incident so we could look into that portion. Please do not post any environment information, etc. in the community.

    Generally, once deployed you would have the extension in the \RetailCloudPos\WebRoot\Extensions\<extensionName> folder.  Under this you should see the \Resources\Strings\en-US\resources.resjson you created has been deployed, along with the other files from the extension.


    Hopefully this helps.

    Todd Berger

    Support Escalation Engineer / Microsoft Dynamics 365 Commerce
    North America Customer Services and Support

  • Retha Profile Picture
    1,457 on at

    Hi Todd, I see that error when running form Visual Studio.

    That's why I can't understand why it is not picking up the labels and only shows the hard-coded "tmc-1" as the column label and why it is telling me that it cannot find the resources file.  

    There is nothing special in the link I gave on what needs to be done. It doesn't explicitly state how to create the resources file though, that is why I mentioned how I did it:

    "The latter was created by selecting to add a new item, then I chose under Visual C# Items, the Resources File, file type and just renamed it to be of type: resjson. ". Just in case this is not how it should be created and are therefore the reason why it can't see the file.

  • Retha Profile Picture
    1,457 on at

    Hi Todd,

    I finally discovered what caused it to not show my labels. I missed a comma between one of the label codes added.

    For the error, it still shows it, not on the screen but in Google Chrome's developer tools. I'm not so sure it is for my resources file it gives the error because my labels are now picked up after I added the missing comma

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 283 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 152 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans