How to open another page instead of Role Center when launching Business Central (Automatically skip the Role Center page)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to discuss an interesting topic, how to open another page instead of Role Center when launching Business Central?

The Role Center is the user’s entry point and home page for Dynamics 365 Business Central.

You can develop several different Role Centers, where each Role Center is customized to the profile of the intended users. For example, you could have Role Centers that target the different levels within an organization, such business owners, department leads, and information workers.

Because this is the homepage of Business Central, the first page we see when we open Business Central is the Role Center page. Is it possible to change this default page? For example, a user wants to jump directly to the Sales Order List (9305, List) page every time they open Business Central. Or employees on the production line want to see the latest order information or their own time sheet when they open the Business Central. Each jump from the Role Center page requires additional operations and time.

The simplest and most original method is to open the page URL directly instead of opening it from the Business Central home page (Role Center). You can save the URL to your favorites or use Copy Link to save the page to your desktop so that you can open it directly next time.

More details: Dynamics 365 Business Central: Filtering Data by the Web Client URL

But this is not the result I want, and if the user uses the Business Central app (Windows app or Mobile app), he cannot open the URL directly.
So what should we do? First of all, the difficulty of this problem is that the Role Center page cannot have triggers.

A page of type Role Center cannot have triggers. AL AL0378

Although you can write the code in codeunit and use OnOpenPageEvent, it will not prompt an error, but it will not have any effect.

Is there no solution? No, we have an event that can be used.
codeunit 9170 “Conf./Personalization Mgt.” -> OnRoleCenterOpen():

Although it cannot completely replace Role Center, you can perform some processing immediately after opening Role Center.

Let’s look at a simple example, when Role Center is opened, the Sales Order List (9305, List) page will be opened automatically.

Let’s take a look at a set of test videos.

Web Client:

Windows App:

Phone App:

Very simple, but please note that this code is run after the Role Center is opened. If there is heavy processing on the Role Center, this processing will be delayed. The easiest way to do this is to create an empty Role Center or minimize the content displayed on the Role Center.

Great, give it a try!!!😁

Test code:

codeunit 50121 RoleCenterHandler
{
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Conf./Personalization Mgt.", OnRoleCenterOpen, '', false, false)]
    local procedure "Conf./Personalization Mgt._OnRoleCenterOpen"()
    begin
        Page.Run(Page::"Sales Order List");
    end;
}

END

Hope this will help.

Thanks for reading.

ZHU

コメント