How to determine the ACTIVE Profile?
bvbeek
Member Posts: 32
Hi everybody!
In the User Personalization you can set the Profile per user, in my case I select the BOOKKEEPER profile.
When I start the Windows Client I got the profile Bookkeeper.
But... if I run the Windows Client from the command line with the parameter:
In this case, I want to know the ACTIVE profile in code.
Looking for something like this:
Do you have a tip or suggestion? Please let me know!
Thank you for your time to read this!
In the User Personalization you can set the Profile per user, in my case I select the BOOKKEEPER profile.
When I start the Windows Client I got the profile Bookkeeper.
But... if I run the Windows Client from the command line with the parameter:
....exe -profile "Order Processor"I got the profile Order Processor.
In this case, I want to know the ACTIVE profile in code.
Looking for something like this:
CASE CurrentProfile(UserID) OF
'BOOKKEEPER':
<code>
'ORDER PROCESSOR':
<code>
ETC.
END;
Do you have a tip or suggestion? Please let me know!
Thank you for your time to read this!
0
Comments
-
Hi Bart,
I think you will need something like Arend-Jan Kauffmann describes in his blog: http://kauffmann.nl/index.php/2015/04/07/read-server-settings-from-cal-code/Jan Veenendaal0 -
That looks promising indeed

I have found the 'Microsoft.Dynamics.Nav.Types.UserSettings', which indeed contain a property 'ProfileName'. The only thing is that I don't know how to get the UserSettings of the current session in this variable. The class only provides a constructor, but that means that I create a new (and empty) version of it. Getting the ProfileName from that of course returns an empty string...
I've reviewed all the .NET types under the assembly, but have not been able to find the one that does the trick. Maybe someone does?0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
