LS,
I created a simple table and card page.
I would have expected the first visible field (First name) to receive focus, but in stead the field Preferred language receives focus.
Looking for an answer I found that D365BC now puts the focus on the first mandatory field, but the field Preferred language is not mandatory.
Setting ShowMandatory on the card page for the First name field didn't help as well.
The Table:
table 50124 StaffNED
{
DataClassification = ToBeClassified;
fields
{
field(1; RecordNumber; Integer)
{
AutoIncrement = true;
DataClassification = ToBeClassified;
}
field(5; FirstName; Text[50])
{
Caption = 'First name';
DataClassification = ToBeClassified;
trigger OnValidate()
var
begin
FullName := FirstName + ' ' + LastName;
end;
}
field(10; LastName; Text[50])
{
Caption = 'Last name';
DataClassification = ToBeClassified;
trigger OnValidate()
var
begin
FullName := FirstName + ' ' + LastName;
end;
}
field(15; FullName; Text[101])
{
Caption = 'Full name';
DataClassification = ToBeClassified;
}
field(20; Email; Text[50])
{
Caption = 'E-mail';
DataClassification = ToBeClassified;
}
field(25; PreferredLanguage; Text[2])
{
Caption = 'Preferred language';
DataClassification = ToBeClassified;
TableRelation = AwsLanguage.ShortName;
}
field(30; Department; Text[50])
{
Caption = 'Department';
DataClassification = ToBeClassified;
TableRelation = if (PreferredLanguage = const('NL'))
SelectionListNL.SelectionContent where(SelectionGroupName = Const('Department'), ApplicationName = Const('KIP'))
else
if (PreferredLanguage = const('DE'))
SelectionListDE.SelectionContent where(SelectionGroupName = Const('Department'), ApplicationName = Const('KIP'))
else
if (PreferredLanguage = const('EN'))
SelectionListEN.SelectionContent where(SelectionGroupName = Const('Department'), ApplicationName = Const('KIP'));
}
}
keys
{
key(PK; RecordNumber, FullName, PreferredLanguage)
{
Clustered = true;
}
}
}
This is the card page:
page 50144 "Staff Card NED"
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = StaffNED;
layout
{
area(Content)
{
group(General)
{
Caption = 'Naam:';
field(RecordNumber; RecordNumber)
{
ApplicationArea = Basic;
Importance = Promoted;
Visible = false;
}
field(FirstName; FirstName)
{
ApplicationArea = Basic;
}
field(LastName; LastName)
{
ApplicationArea = Basic;
}
field(FullName; FullName)
{
ApplicationArea = Basic;
Editable = false;
}
}
group(etc)
{
Caption = 'Overige gegevens:';
field(Email; Email)
{
ApplicationArea = Basic;
}
field(PreferredLanguage; PreferredLanguage)
{
ApplicationArea = Basic;
}
field(Department; Department)
{
ApplicationArea = Basic;
}
}
}
}
}
How can I set the focus on the field First Name when the card page opens?
Kind regards,
Clemens Linders