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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Resource does not exist when using Xrm.Utility.getResourceString

(0) ShareShare
ReportReport
Posted on by 30

Hey all, I'm trying to retrieve the translation string with 

Xrm.Utility.getResourceString("trn_/xml/BECalendar", "WorkWeek")

but I get an error:

Uncaught Error: 'trn_/xml/BECalendar' does not exist.

I followed the steps described here: http://howto-mscrm.com/2017/11/dynamics-365-v9-0-string-resx-web-resources-a-better-world-with-localization.html , created the resx file for language English with resource name containing 1033 (BECalendar.1033.resx), added the resource as dependency for my JS script but am still getting this error.

Is there anything else I have to set?

Any help is much appreciated!

Regards,

Denis

*This post is locked for comments

I have the same question (0)
  • CRM Develope Profile Picture
    894 on at
    RE: Resource does not exist when using Xrm.Utility.getResourceString

    Hello,

    Please check below link:

    bettercrm.blog/.../multi-language-javascript-messages-in-dynamics-365-9-0-using-resx-files

    Thank you

  • David Jennaway Profile Picture
    14,065 on at
    RE: Resource does not exist when using Xrm.Utility.getResourceString

    If the resource is named BECalendar.1033.resx, then your code should be

    Xrm.Utility.getResourceString("BECalendar", "WorkWeek")

  • Suggested answer
    Tim Partridge2 Profile Picture
    38 on at
    RE: Resource does not exist when using Xrm.Utility.getResourceString

    I don't think you need to set anything else. Your function call is correct and the dependency to the JS is correct. Perhaps you have to set the language of your RESX web resource to English (but if that is your base language it probably doesn't matter).


    I had the same problem. I also noticed that after I got the *.1033.resx working, the *.1036.resx was not being found and so the function was falling back to the English one as documented. Eventually I managed to get a value returned from my 1036 resx file, but not the other values (I had the wrong key). I made an update to the 1036 resx file and the update was not being reflected by the return values for xrm.utility.getresourcestring. I did a CTRL + F5 but that was not enough to see the update. Finally, I cleared the cache and I saw the updated values. I'm not sure where the resx file is stored when it is loaded as a dependency of the javascript file but clearing the cache did the trick.

    The other quirk was when updating the resx web resource in the solution in make.powerapps.com by selecting a file, no update to the web resource was performed (as evidenced by opening the web resource). I updated the resx file using the legacy solution in advanced settings > customization and the update to the file worked. Took some time but this seemingly simple function xrm.utility.getresourcestring does actually work.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans