Custom detail information
Custom detail information lets you add additional key-value fields to the detail view of Quality Control App screens via a per-tenant extension (PTE). These fields are displayed dynamically alongside the standard detail information already shown by the app.
Supported screens
Custom detail information can be added to the following screens:
- QC check
- Posted QC check
- QC action
- Posted QC action
CustomInfo object
Each detail item is represented as a JsonObject with the following fields:
| Field | Type | Description |
|---|---|---|
key | string | A unique identifier for this detail item. |
value | string | The value to display. |
Events
To add detail information to a screen, subscribe to the relevant event and append CustomInfo objects to the CustomInfo parameter.
QCABCQualityCheck92FDW.Codeunit.al
[IntegrationEvent(false, false)]
local procedure OnGetQualityCheckCustomDetailInformation(QCCheckHeader: Record QCCheckHeader92FDW; var CustomInfo: JsonArray)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnGetPostedQualityCheckCustomDetailInformation(PostedQCCheckHeader: Record PostedQCCheckHeader92FDW; var CustomInfo: JsonArray)
begin
end;
QCABCAction92FDW.Codeunit.al
[IntegrationEvent(false, false)]
local procedure OnGetQualityActionCustomDetailInformation(QCActionHeader: Record QCActionHeader92FDW; var CustomInfo: JsonArray)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnGetPostedQualityActionCustomDetailInformation(PostedQCActionHeader: Record PostedQCActionHeader92FDW; var CustomInfo: JsonArray)
begin
end;
The record parameter in each event represents the record currently open in the app. Use it to read field values and populate the value field of your CustomInfo objects.
Example
The following example adds two custom detail fields to the QC check screen:
[EventSubscriber(ObjectType::Codeunit, Codeunit::QCABCQualityCheck92FDW, OnGetQualityCheckCustomDetailInformation, '', false, false)]
local procedure AddQCCheckDetailInfo(QCCheckHeader: Record QCCheckHeader92FDW; var CustomInfo: JsonArray)
begin
CustomInfo.Add(AddCustomInfo('createDate', 'Create Date: ' + Format(QCCheckHeader."Create Date")));
CustomInfo.Add(AddCustomInfo('completionDate', 'Completion Date: ' + Format(QCCheckHeader."Completion Date")));
end;
local procedure AddCustomInfo(CustomInfoKey: Text; CustomInfoValue: Text) InfoObject: JsonObject
begin
InfoObject.Add('key', CustomInfoKey);
InfoObject.Add('value', CustomInfoValue);
end;