Skip to main content

Notifications

Community site session details

Community site session details

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

Filter Purchase/Sales order line page by Status

(0) ShareShare
ReportReport
Posted on by 359

Hi!

I think the Sales order line page and Purchase line pages are very useful. However, I am really missing the possibility to filter the lines by Open/Release status for the main order they appear on.

Is there a way to do this without using excel to put togehter Sales order line page and the Sales order page?

  • Verified answer
    YUN ZHU Profile Picture
    81,422 Super User 2025 Season 1 on at
    RE: Filter Purchase/Sales order line page by Status

    Hi, as MahGah said,  status is not in Sales Line.

    So the easiest way is to create a flowfield.

    For example:

    tableextension 80100 SalesLineExt extends "Sales Line"
    {
        fields
        {
            field(50100; Status; Enum "Sales Document Status")
            {
                Caption = 'Status';
                FieldClass = FlowField;
                CalcFormula = lookup("Sales Header".Status where("No." = field("Document No.")));
            }
        }
    }
    
    pageextension 80104 SalesLinesExt extends "Sales Lines"
    {
        layout
        {
            addafter("Document Type")
            {
                field(Status; Rec.Status)
                {
                    ApplicationArea = All;
                }
            }
        }
    }

    pastedimage1642725799873v1.png

    pastedimage1642725807849v2.png

    Hope this will help.

    Thanks.

    ZHU

  • Suggested answer
    MahGah Profile Picture
    15,437 on at
    RE: Filter Purchase/Sales order line page by Status

    Hi

    I checked and status are not in Line. Beside the method you mentioned you need to ask for minor development to add status to line (copy from header to line).

    Or use ODATA in Excel and build the Power Query.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,125 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,871 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans