Customized code in Codeunit 1

ta5
Member Posts: 1,164
Hello
We have a strange behaviour in Codeunit 1.
This works like charm but if a classic report without rtc layout is started in rtc then "something" should not run. Any ideas how to change the code?
Btw: The "something" is a modal form that shows db name, servername, etc.
Thanks in advance.
Thomas
We have a strange behaviour in Codeunit 1.
Function LoginStart: IF GUIALLOWED AND NOT ISSERVICETIER THEN BEGIN //something end;
This works like charm but if a classic report without rtc layout is started in rtc then "something" should not run. Any ideas how to change the code?
Btw: The "something" is a modal form that shows db name, servername, etc.
Thanks in advance.
Thomas
0
Answers
-
Made a short test, when the classic client is loaded for report displaying of not converted reports, the Application Name in the session table shows: "111"
So maybe you could get your session record (set filter to "My Session" = true) and check if appliation name = '111'0 -
Hi Dev.CH
Thanks for reply. Good point, I already knew that, but for different reasons I'd rather would not use session table (problems in some versions if user has only rights for some companies)...
Any other ideas?
Thanks
Thomas0 -
may i know what is your requirement?
If you want to show server name and database name..you can use system indicator functionality in NAV 2009 R2..0 -
mohana_cse06 wrote:may i know what is your requirement?
If you want to show server name and database name..you can use system indicator functionality in NAV 2009 R2..0 -
ta5 wrote:mohana_cse06 wrote:may i know what is your requirement?
If you want to show server name and database name..you can use system indicator functionality in NAV 2009 R2..
yes..exactly0 -
ta5 wrote:good point, but system indicator is for rtc only, isnt't it?
Which build of Nav are you using?~Rik~
It works as expected... More or Less...0 -
Troubles In Paradise wrote:ta5 wrote:good point, but system indicator is for rtc only, isnt't it?
Which build of Nav are you using?0 -
Btw: Why does IsServiceTier does not help?0
-
Because classic reports run on rtc, but don't fall under "isservicetier"0
-
Maybe someone from MS can comment:
a) why Application Name in the Session table is set to '111', when executed through RTC to run classic reports
b) is there another way to distinguish if LoginStart in Codeunit 1 is executed through RTC to run classic reportsNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
deV.ch wrote:Hmm have you tried to add permission at the object level to ensure session table is accessible?
Thomas0 -
It works like this:
Session.SETRANGE("My Session",TRUE); Session.FINDFIRST; IF Session."Application Name" = '111' THEN EXIT;
Thanks for all of the contributions
Thomas0 -
If you get permission problems, you should just grant SELECT permissions to the Session view for the $ndo$shadow application role... (Assuming you are using Standard security)Regards
Peter0 -
Hi,
The solution has been provided already. Here are my answers to your question:
a) The Application Name is set to 111 to avoid consuming another Client session when we launch Classic Client to run a Classic report from RTC.
b) There is no other way to determine if the Classic Client is being launched by RTC to run a report.
Regards,
David“This posting is provided "AS IS" with no warranties, and confers no rights.”0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions