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

Notifications

Announcements

Community site session details

Community site session details

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

Dynamically Set Visibility of Repeater Fields

(0) ShareShare
ReportReport
Posted on by 336

Is it possible to dynamically set the visibility of a repeater field, such as a column in the Sales Lines on a Sales Order? For example, I only want to display the "Action" field column on the Sales Lines if a condition in the Sales Header is met.

I know it's possible to do this dynamically using a Group and a global boolean variable for something in the header. But there is no group property for repeater fields. Is there a way around this?

I have the same question (0)
  • Verified answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    You can do it by customization, for reference see the below code.

    pageextension 50103 "Page46 Ext" extends "Sales Order Subform"
    {
        layout
        {
            modify("Location Code")
            {
                Visible = IsLocationVisible;
            }
        }
    
        trigger OnAfterGetRecord()
        begin
            CheckLocationVisibility();
        end;
    
        trigger OnOpenPage()
        begin
            CheckLocationVisibility();
    
        end;
    
        local procedure CheckLocationVisibility()
        begin
            if SalesHeaderG.Get("Document Type", "Document No.") then
                if SalesHeaderG."Location Code" = '' then
                    Clear(IsLocationVisible)
                else
                    IsLocationVisible := true;
        end;
    
        var
            SalesHeaderG: Record "Sales Header";
    
            [InDataSet]
            IsLocationVisible: Boolean;
    }

    Note: When you next/previous the record, it will visible the location code dynamically based on header Location code.

    pastedimage1592422353307v1.png

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,068 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,194 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,123 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans