Resources["CurrentSessionInfo"].GetCurrentUserLanguage() not working....again
Dear Thingworx community,
today we deployed Thingworx 9.3.5 to a productive platform. When testing all features I noticed a bug and after some investigations I am pretty certain this is not a bug on my end but Thingworx.
We have a user dedicated to run internal Services, called twxServiceUser. This user is supposed to use the local language since we print screens and send it via mail. I have checked this multiple times, reset and set the language (through script and manually in Composer), the preference for this user (in the today's case) is "de", as it should be. Also the printouts appear in German language. But when calling the Service
let langs = Resources["CurrentSessionInfo"].GetCurrentUserLanguage();
by Script I get back an empty string instead of "de".
So I came here / google and searched for this issue, I might not be the only one. And indeed I found a support case, last change 2019 but referring to a post from 2017: https://www.ptc.com/en/support/article/cs292583
First thing to notice: "Resolved in ThingWorx 8.5"
Well, apparently not? Or did it come back somehow?
Second thing to notice: It suggests a workaround using
var result1 = Users[Username].GetUserPreferenceInfo();
Here it gets tricky because my result is depending on the the calling user. With my admin user I indeed get the result "de". But when the user twxServiceUser itself calls this Service it will return an empty string again. This leads to the assumption of a missing permission maybe?
I have only tested on one system so far and as of now it is reproducible. Not sure if / how long this will last. As said before, we are running Release 9.3.5, I haven't found any remark regarding this topix in any release note, neither of this nor of following versions.
Any idea is welcome. Thank you.
Benny

