 addafter("Project Manager")
        {
            field("Previous Year Cost"; Rec."Previous Year Cost")
            {
                ApplicationArea = all;
                Editable = IsEditable;
                Caption = 'Previous Year Cost';

                trigger OnValidate()
                var
                    myInt: Integer;
                    Confirm: Label 'You have added a Prev Yr Cost Amount %1 for the Job %2. It should not be editable once confirmed';
                begin
                    If Rec."Previous Year Cost" <> 0.00 then begin
                        If not (UserId = 'ANUSUYA') then begin
                            If Dialog.Confirm(StrSubstNo(Confirm, Rec."Previous Year Cost", Rec."No."), false) then begin
                                CheckEditable();
                                CurrPage.Update();
                            end else
                                Rec."Previous Year Cost" := 0.00;
                        end;
                    end;
                end;
            }

        }
        addafter("Previous Year Cost")
        {
            field("Previous Year Invoice"; Rec."Previous Year Invoice")
            {
                ApplicationArea = all;
                Editable = IsEditable;
                Caption = 'Previous Year Invoice';

                trigger OnValidate()
                var
                    myInt: Integer;
                    Confirm: Label 'You have added a Prev Yr Inv Amount %1 for the Job %2. It should not be editable once confirmed';
                begin
                    If Rec."Previous Year Invoice" <> 0.00 then begin
                        If not (UserId = 'ANUSUYA') then begin
                            If Dialog.Confirm(StrSubstNo(Confirm, Rec."Previous Year Invoice", Rec."No."), false) then begin
                                CheckEditable();
                                CurrPage.Update();
                            end else
                                Rec."Previous Year Invoice" := 0.00;
                        end;
                    end;
                end;
            }

        }
        addafter("Previous Year Invoice")
        {

            field("Project Cost"; Rec."Project Cost")
            {
                ApplicationArea = all;
                Editable = IsEditable;
                Caption = 'Project Revenue';

                trigger OnValidate()
                var
                    myInt: Integer;
                    Confirm: Label 'You have added a Cost Amount %1 for the Job %2. It should not be editable once confirmed';
                begin
                    If Rec."Project Cost" <> 0.00 then begin
                        If not (UserId = 'ANUSUYA') then begin
                            If Dialog.Confirm(StrSubstNo(Confirm, Rec."Project Cost", Rec."No."), false) then begin
                                CheckEditable();
                                CurrPage.Update();
                            end else
                                Rec."Project Cost" := 0.00;
                        end;
                    end;
                end;
            }

        }
        addafter("Project Cost")
        {
            field("Project Expense"; Rec."Project Expense")
            {
                ApplicationArea = all;
                Editable = IsEditable;

                trigger OnValidate()
                var
                    myInt: Integer;
                    Confirm: Label 'You have added a Expense Amount %1 for the Job %2. It should not be editable once confirmed';
                begin
                    If Rec."Project Expense" <> 0.00 then begin
                        If not (UserId = 'ANUSUYA') then begin
                            If Dialog.Confirm(StrSubstNo(Confirm, Rec."Project Expense", Rec."No."), false) then begin
                                CheckEditable();
                                CurrPage.Update();
                            end else
                                Rec."Project Expense" := 0.00;
                        end;
                    end;
                end;
            }

        }

    }

    var
        [InDataset]
        IsEditable: Boolean;

    local procedure CheckEditable()
    var
        UserRec: Record "User Group Member";
    begin
        If Rec."Previous Year Cost" <> 0 then begin
            If UserId = 'ANUSUYA' then
                IsEditable := true
            else
                IsEditable := false;
        end else
            IsEditable := true;

        If Rec."Previous Year Invoice" <> 0 then begin
            If UserId = 'ANUSUYA' then
                IsEditable := true
            else
                IsEditable := false;
        end else
            IsEditable := true;

        If Rec."Project Cost" <> 0 then begin
            If UserId = 'ANUSUYA' then
                IsEditable := true
            else
                IsEditable := false;
        end else
            IsEditable := true;

        If Rec."Project Expense" <> 0 then begin
            If UserId = 'ANUSUYA' then
                IsEditable := true
            else
                IsEditable := false;
        end else
            IsEditable := true;
    end;

    trigger OnAfterGetCurrRecord()
    var
        myInt: Integer;
    begin
        CheckEditable();

    end;

    trigger OnOpenPage()
    var
        myInt: Integer;
    begin
        CheckEditable();
    end;

    trigger OnAfterGetRecord()
    var
        myInt: Integer;
    begin
        CheckEditable();

    end;

