Skip to main content

Notifications

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,447

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

 

  • Retha Profile Picture
    1,447 on at
    RE: Failed to load resource: the server responded with a status of 404

    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

  • Retha Profile Picture
    1,447 on at
    RE: Failed to load resource: the server responded with a status of 404

    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.

  • Suggested answer
    ToddB Profile Picture
    on at
    RE: Failed to load resource: the server responded with a status of 404

    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

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Zain Mehmood Profile Picture

Zain Mehmood 462 Moderator

#2
Danny Bilodeau Profile Picture

Danny Bilodeau 156 Moderator

#3
Laurens vd Tang Profile Picture

Laurens vd Tang 120 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans