Page definition

For our business requirements, we need to create a Vendor Quality card page. We create a new page of the Card type by using the tpage snippet, as follows:

page 50102 "Vendor Quality Card_PKT"
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = "Vendor Quality_PKT";
Caption = 'Vendor Quality Card';
InsertAllowed = false;

layout
{
area(Content)
{
group(General)
{
Caption = 'General';
field("Vendor No."; "Vendor No.")
{
ApplicationArea = All;
Editable = false;
}
field("Vendor Name"; "Vendor Name")
{
ApplicationArea = All;
Editable = false;
}
field("Vendor Activity Description"; "Vendor Activity Description")
{
ApplicationArea = All;
}
field(Rate; Rate)
{
ApplicationArea = All;
Editable = false;
Style = Strong;
}
field(UpdateDate; UpdateDate)
{
ApplicationArea = All;
Editable = false;
}
}
group(Scoring)
{
Caption = 'Score';
field(ScoreItemQuality; ScoreItemQuality)
{
ApplicationArea = All;
}
field(ScoreDelivery; ScoreDelivery)
{
ApplicationArea = All;
}
field(ScorePackaging; ScorePackaging)
{
ApplicationArea = All;
}
field(ScorePricing; ScorePricing)
{
ApplicationArea = All;
}
}
group(Financials)
{
Caption = 'Financials';
field(InvoicedYearN; InvoicedYearN)
{
ApplicationArea = All;
Editable = false;
}
field(InvoicedYearN1; InvoicedYearN1)
{
ApplicationArea = All;
Editable = false;
}
field(InvoicedYearN2; InvoicedYearN2)
{
ApplicationArea = All;
Editable = false;
}
field(DueAmount; DueAmount)
{
ApplicationArea = All;
Editable = false;
Style = Attention;
}
field(AmountNotDue; AmountNotDue)
{
ApplicationArea = All;
Editable = false;
}
}
}
}

trigger OnOpenPage()
begin
if not Insert() then;
end;

trigger OnAfterGetRecord()
var
VendorQualityMgt: Codeunit VendorQualityMgt_PKT;
begin
VendorQualityMgt.UpdateVendorQualityStatistics(Rec);
end;
}

This page is designed by creating different groups (FastTabs in the UI):

  • General: Contains the general quality classification of the selected vendor, such as the name, a description of the activity, and the calculation rate
  • Scoring: Contains the quality scores (as assigned by the company's quality manager)
  • Financials: Contains the financial data required from the quality requirements

This page has the InsertAllowed property set to true because the record here is inserted automatically when the page is opened from Vendor card (we handle the OnOpenPage trigger here) and the user can't directly insert new records from this page.

We also handle the OnAfterGetRecord page trigger, and from here, we call a function that refreshes the financial statistics.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.77.195