Setting a role centre per client type

I was in a discussion with some fellow MVP’s today and the subject of different role centres for the windows tablet and especially the phone client came up. I contend (with some at Microsoft disagreeing) that often what you want on your phone is not the same as what you want on your full desktop client.  I promised to detail how I’ve managed to customise this in 2016.

So, how do you do this?

1. I choose to add three fields to the User Setup table and page (which means I can change it per company) – those fields had a table relation across to the Profile ID field in the profile table.

clip_image002

2. Create a codeunit with a function that when called returns the profile ID of the role centre you want to use using the new 2016 CurrentClientType function.

clip_image003

3. Next on the properties of that function make it an event subscriber to the OnAfterGetDefaultRoleCentre event function in the codeunit one event publisher

clip_image005

4. Next make sure you take the Profile ID is blank on the Users Personalization page.

clip_image006

5. Finally make sure there is none of the records listed on the Profiles page have the ‘Default Role Centre’ flag set.

clip_image007

Now when you login, the system cannot find a profile to use from your user or a default on the profiles table, so it triggers the DefaultRoleCentre function in codeunit one. This will set the profile ID to the default 9006 (yes, its hard coded!) via a call to codeunit 9170. Then however it calls the event we have just subscribed to, it works out which client your using and changes the profile ID in time to set everything up as need.

Simple but effective if you agree we need a profile that’s at least different for the phone.

Author: James Crowter

I’m passionate about how businesses can improve their efficiency by getting process optimal more of the time. For the last twenty five years I’ve worked to help organisations of all sizes and types implement the ERP & CRM software that typically they decide they need when things are going wrong. I’ve seen that work unbelievably well and enabled those organisations to rapidly grow but I’ve also had some hard projects over that time where it’s felt more like warfare at times. Since 1996 (and version 1.01) I’ve been working with a small Danish product called Navision that’s now become Microsoft’s Dynamics NAV and I’ve also been using and consulting around Microsoft CRM since 2005. As managing Director of one of the longest established first Navision and now Microsoft Dynamics partners I’ve been involved in the complete history including numerous product councils and system design reviews. It’s my privilege to know many of the key Microsoft executives and product designers and have insight into both where the products are now and their future direction. So colleagues & clients have asked me to start this blog to share some of the insight that both this knowledge (obviously where not restricted by NDA’s or client confidentiality) and experience can help. Specifically I want to concentrate not on the specifics of how (there are some great blogs already for that) but why. If any user helps their business make better decisions or consultant can give better advice then that will be objective achieved. I founded Technology Management in 1992 and have led from the front ever since. Helping clients use technology to grow their business is my passion through explaining technology in terms that everyone can understand. My interest in computing began at the age of eight, long before my school had the equipment to cope. Throughout school and university I developed software commercially. I hold many IT certifications, such as Microsoft Dynamics NAV (for over 17 years), Microsoft Dynamics CRM (for over 10 years), as well as Microsoft Windows Server, Exchange and SQL. In October 2015, I was awarded the title of Most Valuable Professional (MVP), a title given to a select few individuals (31 currently) across the world specifically for Dynamics NAV. After years of working with a range of distribution and manufacturing software for hundreds of organisations, I focus on understanding the business requirements of an organisation, what it will take to deliver the systems required to maximise their potential. Follow me online via my other social channels: - Twitter: @jamescrowter - LinkedIn: linkedin.com/in/jamescrowter Or email me directly at james[.]crowter[@]tecman.co.uk.

Leave a Reply

Your email address will not be published. Required fields are marked *