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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to inherit values in fields

(0) ShareShare
ReportReport
Posted on by 99

Hi all, 
On the Clients page I added three fields, field A is the main one, field B depends on field A and field C depends on field A and B, so if field A is empty if fields B and C have any value, it should be cleared automatically or if the selection of field B and C does not correspond to field A and they have information, it should also clear. Any advice to do that?

I created three tables for each field because they are different catalogs and added the main fields to Customer table as table extension

tableextension 50013 ExtCustomerSegment extends Customer
{
    fields
    {
        field(50000; "Segment No."; Code[20])
        {
            Caption = 'Segment No.';
            DataClassification = ToBeClassified;
            TableRelation = Segment."No.";
            ValidateTableRelation = true;
        }
        field(50001; "Subsegment No."; Code[20])
        {
            Caption = 'Subsegment No.';
            DataClassification = ToBeClassified;
            TableRelation = Subsegment."No." where("Segment No." = field("Segment No."));
            ValidateTableRelation = true;
        }
        field(50002; "Value No."; Code[20])
        {
            Caption = 'Value No.';
            DataClassification = ToBeClassified;
            TableRelation = tValue."No." where("Segment No." = field("Segment No."), "Subsegment No." = field("Subsegment No."));
        }
    }
}

Thanks in advance

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    152 on at

    In standard a similar, although not complete example, is on the customer table. The “City” and “Post Code” fields have field relationships. Upon specific data changing a validation is run on the related fields. Depending on the validation result the fields could be cleared

  • isabtogumon Profile Picture
    99 on at

    Hi @Josh Anglesea

    Thanks for answering, I have reviewed some examples in standard, however I still do not see it clearly

  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at

    Hi, you can use OnValidate (Field) Trigger under these fields. This trigger is run after the default validation behavior when data is entered in a field. 

    For more details: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/triggers-auto/field/devenv-onvalidate-field-trigger

    Hope this will help.

    Thanks.

    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

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 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans