17
Tested on latest BC19 dev Sandbox and AL extension.

If a page has only conditionally visible factboxes, BC opens it with those factboxes hidden/unfocussed, seemingly because it decides whether to show the factbox pane - and whether to focus its Details (user) or Attachments (system) tab - during OnOpenPage(). But it is a very common need to decide part visibility later, in OnAfterGetCurrRecord().

If there are System parts (Notes/Links) then the page shows those, and user must click back to to Details tab to see the normal factboxes.

If not, it shows the factbox pane collapsed, and user must expand it, or if there are no factboxes at all that end up being visible, the pane disappears.

Neither of the bold provide an adequate user experience: we need the first tab to be focussed, showing relevant custom factboxes, not just standard system ones.

We found this when using Continia Document Capture / Expense Management, but it happens with custom factboxes too. Users opening those pages expect to see the document right away if one exists; having to click from Attachments to Details is unnecessary work and very underwhelming UX to have to give them.

For that last reason... I found that a workaround is to make a dummy factbox with Caption = ' ' and add it at the end of area(factboxes), always visible, but that is insane!

Please, make this work better! It might suffice just to add re-evaluating whether to show the pane - and which of its tabs to focus - after a record is got in OnAfterGetCurrRecord().

sample:

page 50100 TestCustomerCard
{
ApplicationArea = All;
Caption = 'Test Customer Card';
PageType = Card;
SourceTable = Customer;
UsageCategory = Administration;

layout
{
area(FactBoxes)
{
part(CustomerDetailsFactbox; "Customer Details FactBox")
{
ApplicationArea = All;
Visible = CustomerDetailsFactboxVisible;
}

/*
systempart(Links; Links)
{
ApplicationArea = All;
}

systempart(Notes; Notes)
{
ApplicationArea = All;
}
*/
}
}

var
CustomerDetailsFactboxVisible: Boolean;

trigger OnAfterGetCurrRecord()
begin
CustomerDetailsFactboxVisible := Rec.Name[1] = 'A';
end;
}

Try it on Customers whose Name does and doesn't begin with A, and with the systemparts both commented and uncommented.
Category: General
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team

Comments

D

This was posted on
https://github.com/microsoft/AL/issues/6367

and to MS Support, who said they think it's OK but to file an Idea, so here I am!

Category: General