Managing Dynamics NAV Profiles from the profile list page

image

One of the topics I address on nearly all my courses is RoleTailoring. How to set up profiles and how to assign them to users. The process of configuring and personalizing the profiles is also a hot topic and during the implementation process, it is recommended to create special shortcuts for each active profile in the company in order to maintain each profile.

image

Each of these shortcuts points to a specific profile and it can also point to a configuration file containing information on:

· Server name

· Instance name

· Port number

· Credentials type.

An example of the destination of the shortcut could look like this:

 

"C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe" -profile:"MACHINE OPERATOR" -settings:"C:\Users\Administrator\Desktop\Manufacturing\ClientUserSettings.config"

 

The –profile parameter refers to the desired profile name and adding the –configure parameter will start the client in configuration mode.

image When starting up the client with the –profile parameter, it is the permissions of the user running the shortcut that count. It is possible to run the shortcut as another user, by right clicking the shortcut with the shift key pressed and selecting “run as a different user”.

image In Dynamics NAV 2013, the user running the shortcut must be owner of the profile in order to start a profile in configuration mode.

This has also been the usual way for me to open profiles, but it becomes a bit tedious to have to create shortcuts every time it is necessary to configure a new profile.

On one of my courses in Jutland, a creative student (I’m sorry I don’t remember your name) provided a simple solution for this:

Why not open the profile directly from the profile list?

So he designed this simple solution:

In the Development Environment go to the Profile List page (9171) and perform the following

1) Design the page

2) Click View/C/AL Globals

3) Add a new function called OpenClient

image

4) Click Locals and create one parameter

image

5) And one local variable

image

The full Subtype must be (can be copy/pasted):

System.Diagnostics.Process.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

6) Now Go back to the function and press F9 (Design) and type the following:

image

7) Now it is necessary to create two new actions on the Profile List:

a. Go back to the Profile List in design mode:

image

b. Click View/Page Actions:

c. Add two new actions:

image

d. On the “Open Profile” action, press F9 and type:

OpenClient(FALSE);

e. Go back to the actions and switch to the “Configure Profile” action press F9 and type:

OpenClient(TRUE);

With a little documentation, it could look like this:

image

8) Press Esc until prompted to save the object

From now on, all you need to do to open or configure a profile is to open the Profile List, find the DISPATCHER profile and click Open Profile:

image

…and the DISPATCHER profile opens:

image

…or to open it in configuration mode:

image

I used the property Image WorkCenter for the Open Profile action and the property Image Setup for the Configure Profile action.

Believe me – Your life will not be the same again.

Anonymous
Related