Good Evening
As i am trying to apply some range on Aot Query - Language Id - (SysQueryRangeUtil::currentLanguageId())
But this is not working.
How can i apply in range for current company - Language id
Regards,
Have a nice day.
Good Evening
As i am trying to apply some range on Aot Query - Language Id - (SysQueryRangeUtil::currentLanguageId())
But this is not working.
How can i apply in range for current company - Language id
Regards,
Have a nice day.
You can solve this issue by joining the translation table with the company info table on the basis of language id.
Hi,
Please note, If you used your query in the dialog in UI, you probably already saved last selection and keep using old value even if you changed it code. To resolve it, you need to reset query or reset usage data.
Sorry, my mistake. It actually works exactly as it should.
Try reproducing my case. Create a simple query with just EcoResProductTranslation and add a range there. Than test the result. I used this code:
Query q = new Query(queryStr(MyQuery)); info(q.dataSourceNo(1).toString()); q.dataSourceNo(1).addGroupByField(fieldNum(EcoResProductTranslation, LanguageId)); QueryRun qr = new QueryRun(q); while (qr.next()) { EcoResProductTranslation t = qr.getNo(1); info(t.LanguageId); }
The method was called and the range was applied as expected.
It looks correct to me. I've tried to build a simple query on my own and I can confirm that it doesn't work for me either. Let me check if I can find the problem.
Then I suspect that you're using it wrong. Can you give us a screenshot of your range setup?
Its not working martin
Hi partner,
Sorry for that I didn't understand your requirement just now.
Please try Martin's suggestion.
You can also try SysQueryRangeUtil::value() and pass a String as the parameter.
Could you please try (currentLanguageId()) as suggested before? If it doesn't work, it means that either the standard method is broken, or - more likely - you're using it wrong.
Hi Will Wu,
I cannot use X++ to create Quer because i want view so that i can use that view as datas oource to my Panel.
Regards
André Arnaud de Cal...
292,884
Super User 2025 Season 1
Martin Dráb
231,760
Most Valuable Professional
nmaenpaa
101,156
Moderator