Dynamics 365 Business Central: checking Users Plans in Wave 2 release

Checking which plan is assigned to a specific user (Essential, Premium, Team Member) is become a quite different thing with the Wave 2 release (version 15).

Users plans are now managed in the System Application via the Azure AD Plan module. The Plan and User Plan tables are now marked as internal, so you must use the methods provided in this module to query them.

How can you check if a user is an Essential, Premium or Team Member user with the version 15 release? You now have a query object called Users in Plans and you can use this object to retrieve the plans assigned to your user.

For showing how to do this with the version 15 release, I’ve created a small extension that adds an action to the User Card page and then calls a GetUserPlan method defined in a custom codeunit. The method is defined as follows:

D365BCUsersPlans_01.jpg

The method uses the Users in Plans query by filtering for the USERID to check and then retrieves the Plan_Name and User_State fields.

Output is like the following:

D365BCUsersPlans_02.jpg

Not so clear why a query object instead of a codeunit, but that is… 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.