Dear All
Somehow our declared labels for thrown errors are not selected accoring to the POS user language. Is there a possibilty to change the session language?
Thanks
Dear All
Somehow our declared labels for thrown errors are not selected accoring to the POS user language. Is there a possibilty to change the session language?
Thanks
Hi there
So I found a way to go around the problem, still it is curious that it dies not take the users (cashier) language:
xInfo myInfo = new xInfo();
LanguageId myLang = myInfo.language();
str text = new Label(myLang).extractString("@Label");
text = new Label("en-us").extractString("@Label" + subStr(myLang,1,2));
throw error(strFmt(text,));
Hi Hanna85,
Probably RunAs method could solve your issue, but I have a feeling that the language parameter doesn't work properly
I‘m sorry for the confusion.
I‘m throwing the error in the code, the string comes from the label file:
throw error(error123, var1)
Error123 is acailable in 3 different languages.
the cashier on cloud POS sees the mssage, but in the wrong language.
so i‘d like to override the session language with the users language
Hi Hanna85,
Can you elaborate? Is the error coming from POS or is the cashier using Dynamics 365 client? What exactly is 'Label' in the throw error command? Can you share a screenshot with the current error?
Hi there.
We use different POS Setups.
To explain the problem:
the cashier wants to add a new customer, when he clicks safe, some code is running and when a error occurs a error is thrown:
throw error(Label)
The error message comes from the Label file. As the code is called by the RetailSystemUser, the language of this user does not represent the language of the cashier.
I just would like to temporarly overwrite the session language
Hi Hanna85,
Could you, please, explain a bit what kind of POS are you using? Do you mean that only custom labels don't show text in user language or all kinds of labels?
Thanks. But I really just need a quick code line, if possible. As it is just for RetailsServiceUser coming from the POS. There is no need to implement it for every user
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156