Page 5223 Human Resource Comment List

App
Base Application
Namespace
Microsoft.HumanResources.Comment
Versions
17-28
Source table
5208

Procedures, 1

Versions171819202122232425262728

Source29

Source in 29

src/Layers/W1/BaseApp/HumanResources/Comment/HumanResourceCommentList.Page.al113 lines, Copyright (c) Microsoft Corporation. MIT

// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.HumanResources.Comment;

using Microsoft.HumanResources.Absence;
using Microsoft.HumanResources.Employee;

page 5223 "Human Resource Comment List"
{
    Caption = 'Comment List';
    DataCaptionExpression = Caption(Rec);
    Editable = false;
    LinksAllowed = false;
    PageType = List;
    SourceTable = "Human Resource Comment Line";

    layout
    {
        area(content)
        {
            repeater(Control1)
            {
                ShowCaption = false;
                field("No."; Rec."No.")
                {
                    ApplicationArea = BasicHR;
                }
                field(Date; Rec.Date)
                {
                    ApplicationArea = BasicHR;
                }
                field(Comment; Rec.Comment)
                {
                    ApplicationArea = Comments;
                }
                field("Code"; Rec.Code)
                {
                    ApplicationArea = BasicHR;
                    Visible = false;
                }
            }
        }
    }

    actions
    {
    }

    var
        Employee: Record Employee;
        EmployeeAbsence: Record "Employee Absence";
        EmployeeQualification: Record "Employee Qualification";
        EmployeeRelative: Record "Employee Relative";
        MiscArticleInfo: Record "Misc. Article Information";
        ConfidentialInfo: Record "Confidential Information";
        UntitledTxt: Label 'untitled', Comment = 'it is a caption for empty page';

    procedure Caption(HRCommentLine: Record "Human Resource Comment Line"): Text
    begin
        case HRCommentLine."Table Name" of
            HRCommentLine."Table Name"::"Employee Absence":
                if EmployeeAbsence.Get(HRCommentLine."Table Line No.") then begin
                    Employee.Get(EmployeeAbsence."Employee No.");
                    exit(
                      Employee."No." + ' ' + Employee.FullName() + ' ' +
                      EmployeeAbsence."Cause of Absence Code" + ' ' +
                      Format(EmployeeAbsence."From Date"));
                end;
            HRCommentLine."Table Name"::Employee:
                if Employee.Get(HRCommentLine."No.") then
                    exit(HRCommentLine."No." + ' ' + Employee.FullName());
            HRCommentLine."Table Name"::"Alternative Address":
                if Employee.Get(HRCommentLine."No.") then
                    exit(
                      HRCommentLine."No." + ' ' + Employee.FullName() + ' ' +
                      HRCommentLine."Alternative Address Code");
            HRCommentLine."Table Name"::"Employee Qualification":
                if EmployeeQualification.Get(HRCommentLine."No.", HRCommentLine."Table Line No.") and
                   Employee.Get(HRCommentLine."No.")
                then
                    exit(
                      HRCommentLine."No." + ' ' + Employee.FullName() + ' ' +
                      EmployeeQualification."Qualification Code");
            HRCommentLine."Table Name"::"Employee Relative":
                if EmployeeRelative.Get(HRCommentLine."No.", HRCommentLine."Table Line No.") and
                   Employee.Get(HRCommentLine."No.")
                then
                    exit(
                      HRCommentLine."No." + ' ' + Employee.FullName() + ' ' +
                      EmployeeRelative."Relative Code");
            HRCommentLine."Table Name"::"Misc. Article Information":
                if MiscArticleInfo.Get(
                     HRCommentLine."No.", HRCommentLine."Alternative Address Code", HRCommentLine."Table Line No.") and
                   Employee.Get(HRCommentLine."No.")
                then
                    exit(
                      HRCommentLine."No." + ' ' + Employee.FullName() + ' ' +
                      MiscArticleInfo."Misc. Article Code");
            HRCommentLine."Table Name"::"Confidential Information":
                if ConfidentialInfo.Get(HRCommentLine."No.", HRCommentLine."Table Line No.") and
                   Employee.Get(HRCommentLine."No.")
                then
                    exit(
                      HRCommentLine."No." + ' ' + Employee.FullName() + ' ' +
                      ConfidentialInfo."Confidential Code");
        end;
        exit(UntitledTxt);
    end;
}