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

Check current field in the table based on the page filtergroup

(0) ShareShare
ReportReport
Posted on by 50

Hi Everyone,

I need second opinion on which practice to do it in this condition.

I'm a newbie in this AL stuff and need your opinion on how you do it your way.

I create a table and page based on sales line with 1 to many relation.

for example a property table like below where 1 sales line can have multiple record on it, and the entry number is the primary key.

LineProperty table with these fields : Entry No.(PK), Document Type, Document No, Line No., Property Name, Property Age.

Entry No will be created automatically when record inserted.

The page will be run through this function that's called on action on sales order subform. 

                var
                    PropertyTable: Record "Property";
                    PropertyPage: Page "Property";
                begin
                    Property.FilterGroup(10);
                    Property.SetRange("Document Type", rec."Document Type");
                    Property.SetRange("Document No.", rec."Document No.");
                    Property.SetRange("Line No.", rec."Line No.");
                    Property.FilterGroup(0);
                    PropertyPage.SetTableView(PropertyTable);
                    PropertyPage.RunModal;
                end;

There are two advise i need.

1st ---

Is there a method you can advise to create new record in the PropertyPage by getting the value of DocumentType,

DocumentNo, and LineNo from the one i get from Sales Line without using global function to pass value to the page ?

2nd --

For example there are already two records on page with current view (Document type = Invoice, Document No = 01, Line No = 10000)

Entry No : 1

Property Name : Springtime Mansion

Property Age: 12

Entry No: 2

Property Name : Trine Tower Mansion

Property Age: *Empty* (not yet inputted)

And i want to prevent creation on new record because previous record Property Age is still need to be filled before user can create another record. How to do in this situation ?

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 727 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 512 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 321 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans