web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Problem or bug in FastTab using repeaters

(0) ShareShare
ReportReport
Posted on by 5

I'm using docker with image 'mcr.microsoft.com/businesscentral/onprem:15.4.41023.41345-dk-ltsc2019'

I have a problem when using repeaters, which have condional editable, in a FastTab.

I have the following code

table 50100 "TRS Booking"
{
    DataClassification = CustomerContent;

    fields
    {
        field(1; "No."; Code[20])
        {
            Caption = 'No.';
            DataClassification = CustomerContent;
        }
        field(2; "State"; Enum "TRS Booking State")
        {
            Caption = 'State';
            DataClassification = CustomerContent;
        }
    }

    keys
    {
        key(PK; "No.")
        {
            Clustered = true;
        }
    }

    trigger OnInsert()
    begin
    end;

    trigger OnModify()
    begin
    end;

    trigger OnDelete()
    begin
    end;

    trigger OnRename()
    begin
    end;
}

table 50101 "TRS Cargo Line"
{
    DataClassification = CustomerContent;

    fields
    {
        field(1; "Booking No."; Code[20])
        {
            Caption = 'Booking No.';
            DataClassification = CustomerContent;
        }
        field(2; "Line No."; Integer)
        {
            Caption = 'Line No.';
            DataClassification = CustomerContent;
        }
        field(22; "State"; Enum "TRS Booking State")
        {
            Caption = 'State';
            DataClassification = CustomerContent;
            Editable = false;
        }
    }

    keys
    {
        key(PK; "Booking No.", "Line No.")
        {
            Clustered = true;
        }
        key(FK1; "Booking No.")
        {

        }
    }

    trigger OnInsert()
    begin
    end;

    trigger OnModify()
    begin
    end;

    trigger OnDelete()
    begin
    end;

    trigger OnRename()
    begin
    end;
}

enum 50100 "TRS Booking State"
{
    Extensible = true;

    // Booking and price lines is open for editing
    value(0; Open)
    {
        Caption = 'Open';
    }
    // Booking and price lines has been approve and are ready for transfer
    value(10; Approve)
    {
        Caption = 'Approve';
    }
    // Booking has been transferred 
    value(20; Close)
    {
        Caption = 'Close';
    }
}

page 50100 "TRS Booking"
{
    Caption = 'Booking';
    PageType = Card;
    UsageCategory = None;
    SourceTable = "TRS Booking";

    layout
    {
        area(Content)
        {
            group("TRS General")
            {
                Caption = 'TRS General';
                Editable = State = State::Open;

                field("No."; "No.")
                {
                    ApplicationArea = All;
                    Editable = true;
                    Importance = Promoted;
                }
                field("State"; "State")
                {
                    ApplicationArea = All;
                    Editable = false;
                }
            }

            group("TRS Cargo")
            {
                Caption = 'TRS Cargo';
                group("TRS Cargo 1.2")
                {
                    ShowCaption = false;
                    part("TRS Cargo Lines"; "TRS Cargo Lines")
                    {
                        ApplicationArea = All;
                        ShowFilter = false;
                        SubPageLink = "Booking No." = field("No.");
                    }
                }
            }
        }
    }

    actions
    {
        area(Processing)
        {
            action("TRS Approve Booking")
            {
                Caption = 'TRS Approve Booking';
                ApplicationArea = All;
                Image = Close;
                Enabled = State = State::Open;

                trigger OnAction()
                begin
                    "Booking Mgt.".ApproveBooking(Rec);
                end;
            }
            action("TRS UnApprove Booking")
            {
                Caption = 'TRS UnApprove Booking';
                ApplicationArea = All;
                Image = Close;
                Enabled = State = State::Approve;

                trigger OnAction()
                begin
                    "Booking Mgt.".UnApproveBooking(Rec);
                end;
            }
        }
    }

    trigger OnInsertRecord(BelowxRec: Boolean): Boolean
    var
        "Cargo Line": Record "TRS Cargo Line";
    begin
        "Cargo Line".Init();
        "Cargo Line"."Booking No." := "No.";
        "Cargo Line"."Line No." := 10000;
        "Cargo Line".Insert();
    end;

    var
        "Booking Mgt.": Codeunit "TRS Booking Manager";
        "Is Editable": Boolean;
}

page 50102 "TRS Cargo Lines"
{
    Caption = 'Cargo Lines';
    PageType = ListPart;
    ApplicationArea = All;
    UsageCategory = Administration;
    SourceTable = "TRS Cargo Line";
    AutoSplitKey = true;

    layout
    {
        area(Content)
        {
            repeater(General)
            {
                Editable = State = State::Open;

                field("Booking No."; "Booking No.")
                {
                    ApplicationArea = All;
                    Visible = false;
                    Editable = false;
                }
                field("Line No."; "Line No.")
                {
                    ApplicationArea = All;
                }
                field(State; State)
                {
                    ApplicationArea = All;
                    Editable = false;
                }
            }
        }
    }
}

codeunit 50100 "TRS Booking Manager"
{
    internal procedure ApproveBooking(var Booking: Record "TRS Booking")
    var
        "Cargo Line": Record "TRS Cargo Line";
    begin
        if (Booking.State = Booking.State::Open) then begin

            "Cargo Line".SetFilter("Booking No.", '=%1', Booking."No.");
            if "Cargo Line".FindSet() then
                repeat
                    // change state on cargo line
                    "Cargo Line".State := "Cargo Line".State::Approve;
                    "Cargo Line".Modify();
                until "Cargo Line".Next() = 0;

            Booking.State := Booking.State::Approve;
        end;
    end;

    internal procedure UnApproveBooking(var Booking: Record "TRS Booking")
    var
        "Cargo Line": Record "TRS Cargo Line";
    begin
        if (Booking.State = Booking.State::Approve) then begin

            "Cargo Line".SetFilter("Booking No.", '=%1', Booking."No.");
            if "Cargo Line".FindSet() then
                "Cargo Line".ModifyAll(State, "Cargo Line".State::Open);

            Booking.State := Booking.State::Open;
        end;
    end;
}

When I open my booking card page and click the approve or unapprove button.

If the FastTab is open when I open the page everything works correct, but if the FastTab is closed  then I get this  error in the browser.

{"jsonrpc":"2.0","method":"LOGERROR","params":[{"clientInfo":{"platform":"Win32","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363","browserLanguage":"da-DK"},"message":"Unable to get property 'get_element' of undefined or null reference","pageUrl":"http://mod/BC/?page=50100&company=CRONUS Danmark&dc=0&runinframe=1","originalError":{},"detailedMessage":"   at DN.RepeaterControlAdapter.prototype.onEditableChanged (http://mod/BC/js/framework.js?h=B41614F65C2534E8B7D1DE86F184576FE96CAD639A808C61E420659EBBE72E30&_v=15.0.40939.41271:5576:3953)\r\n   at DN.LogicalControlAdapter.prototype.onLogicalControlPropertyChanged (http://mod/BC/js/framework.js?h=B41614F65C2534E8B7D1DE86F184576FE96CAD639A808C61E420659EBBE72E30&_v=15.0.40939.41271:5138:1187)\r\n   at Type.prototype.callBaseMethod (http://mod/BC/js/mscorlib.js?h=CF4DC817097681759C949D3A168AB341FB735B938B5B4DD71259BE085DD88E42&_v=15.0.40939.41271:1:23528)\r\n   at DN.RepeaterControlAdapter.prototype.onLogicalControlPropertyChanged (http://mod/BC/js/framework.js?h=B41614F65C2534E8B7D1DE86F184576FE96CAD639A808C61E420659EBBE72E30&_v=15.0.40939.41271:5574:3102)\r\n   at DN.LogicalControlAdapter.prototype.$28 (http://mod/BC/js/framework.js?h=B41614F65C2534E8B7D1DE86F184576FE96CAD639A808C61E420659EBBE72E30&_v=15.0.40939.41271:5138:667)\r\n   at b (http://mod/BC/js/mscorlib.js?h=CF4DC817097681759C949D3A168AB341FB735B938B5B4DD71259BE085DD88E42&_v=15.0.40939.41271:1:26048)\r\n   at Anonymous function (http://mod/BC/js/logicalclientdll.js?h=9A867ED61E4F818CA05EFE74E144AF4AA820C2814E2BB2573EBFCA50F18D3492&_v=15.0.40939.41271:16:53472)\r\n   at Array.prototype.forEach (native code)\r\n   at e.prototype.emit (http://mod/BC/js/logicalclientdll.js?h=9A867ED61E4F818CA05EFE74E144AF4AA820C2814E2BB2573EBFCA50F18D3492&_v=15.0.40939.41271:16:53378)\r\n   at e.prototype.flushScope (http://mod/BC/js/logicalclientdll.js?h=9A867ED61E4F818CA05EFE74E144AF4AA820C2814E2BB2573EBFCA50F18D3492&_v=15.0.40939.41271:16:142886)\r\n","silent":true}],"id":1}

And my card window "freezes", which means I can not close the window. I have to close the browser.

I have the same question (0)
  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    Please contact your CSP or Reseller and have them file a request to Microsoft support to investigate this issue further.

  • Community Member Profile Picture
    on at

    The repeater 'Accidents' is not supported by the Web client.

    {
    "resource": "/c:/EvolveiMS/Repos/dev/Nav/DRON001/13.0 (Nav BC)/Extension/HR/Page/iMS Accidents 9043230.al",
    "owner": "generated_diagnostic_collection_name#1",
    "code": "AW0008",
    "severity": 4,
    "message": "The repeater 'Accidents' is not supported by the Web client.",
    "source": "AL",
    "startLineNumber": 12,
    "startColumn": 22,
    "endLineNumber": 12,
    "endColumn": 31
    }

    AL Language Information:

    Name: AL Language
    Id: ms-dynamics-smb.al
    Description: AL development tools for Dynamics 365 Business Central
    Version: 3.0.115791
    Publisher: Microsoft

    Admin

    Apps4rent | o365cloudexperts

  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    Then I think this comes because you have not enabled UI cop code analyzer. If you enable UI Cop in the code analyzer most probably you would have catch this.

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-using-code-analysis-tool

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/uicop

  • JesperHaven Profile Picture
    5 on at

    The UICode analyser is enabled. And I get no Warning or error on this

  • Verified answer
    THE Italian Profile Picture
    Microsoft Employee on at

    If there is no warning or error thrown when code analyzers are enabled (basically this should be within UI Cop) then I would suggest you to go with one of the following:

    a. open a request to Microsoft support through the official channel and via your CSP or Reseller partner

    or

    b. file your issue into GitHub to have this resolved in a future major version https://github.com/Microsoft/al/issues

  • JesperHaven Profile Picture
    5 on at

    I will try this.

    Thank you for the help

  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    Then you have your own answer: by design.

    Directly from development team PMs

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,386 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,774 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,515

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans