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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Running this RunObject = page QualityDialog; RunPageLink = "Item No." = field("No.");

(0) ShareShare
ReportReport
Posted on by 157
Hello experts I have a requirement.
1.  Here is the following code that inserts some records into the table named buffer table, here the problem is these 2 lines in my code run before the record inserting.  
RunObject = page QualityDialog;
                RunPageLink = /Item No./ = field(/No./);
2. Here I need the same 2 lines do requirements after inserting these records,
3. here is what I need after inserting those records it should open the dialog box with the matched records in detail this 
RunPageLink = /Item No./ = field(/No')

shows the matched records of the buffer table by validating with the filed named (No.) of the purchase line.

Here is the Main code.
pageextension 71516710 myect extends /Purchase Order Subform/
{
    actions
    {
        addafter(BlanketOrder)
        {
            action(Quality)
            {
                ApplicationArea = All;
                Caption = 'Quality';
                Image = Action;
                ToolTip = 'Open the quality dialog box for the selected item';
 
                RunObject = page QualityDialog;
                RunPageLink = /Item No./ = field(/No./);



 
                trigger OnAction()
                var
                    QualityDialog: Page QualityDialog;
                    QualityCode: Record QualityCodeTable;
                    Item: Record Item;
                    PurchaseLine: Record /Purchase Line/;
 
                begin
                    CurrPage.SetSelectionFilter(PurchaseLine);
                    if PurchaseLine.FindFirst() then begin
 
                        if (PurchaseLine.Type = PurchaseLine.Type::Item) or (PurchaseLine.Type = PurchaseLine.Type::/Fixed Asset/) then begin
                            Item.Get(PurchaseLine./No./);
                            if Item./Quality Applicable/ and (Item./Quality code/ <> '') then begin
                                MyProcedure(Item, PurchaseLine, QualityDialog);
                            end
                            else
                                Error('The item %1 does not have a quality code assigned.', Item./No./);
                        end
                        else
                            Error('The item %1 is not quality applicable.', Item./No./);
                    end
                    else
                        Error('The line type %1 is not supported for quality.', PurchaseLine.Type);
 
                   
                end;


 
            }




 
        }
    }
 
    var
        PurchaseHeader: Record /Purchase Header/;
 
    local procedure MyProcedure(var Item: Record Item; var Rec: Record /Purchase Line/; var DialogBox: Page QualityDialog)
    var
        MainTable: Record QualityCodeTable;
        PartTable: Record QualityParamater;
        qualityparasubform: Record QualityParamaterSubform;
        BufferTable: Record QualityCodeTabletestdialoug;
        PurchaseLine: Record /Purchase Line/;
        ItemFilter: Record Item;



 
    begin
 
        qualityparasubform.SetRange(/No./, Item./Quality code/);
        qualityparasubform.SetRange(/Item No./, Item./No./);
        if qualityparasubform.FindSet() then begin
            repeat
                BufferTable.SetRange(Number_buffer, qualityparasubform./No./);
                BufferTable.SetRange(/Item No./, qualityparasubform./Item No./);
                BufferTable.SetRange(/Quality Parameter Code/, qualityparasubform./Quality Paramater Code/);
 
                if not BufferTable.FindFirst() then begin
                    BufferTable.Init();
                    BufferTable.Number_buffer := qualityparasubform./No./;
                    BufferTable./Item No./ := qualityparasubform./Item No./;
                    BufferTable./Line No/ := qualityparasubform./Line No/;
                    BufferTable./Quality Parameter Code/ := qualityparasubform./Quality Paramater Code/;
                    BufferTable.Particulars := qualityparasubform.Particulars;
                    BufferTable./Approved Parameters/ := qualityparasubform./Approved Parameters/;
                    BufferTable./Unit of Measurement/ := qualityparasubform./Unit of Measurement/;
                    BufferTable.Remarks := qualityparasubform.Remarks;
                    BufferTable.Insert(true)
                end
                else begin
                    BufferTable.Number_buffer := qualityparasubform./No./;
                    BufferTable./Item No./ := qualityparasubform./Item No./;
                    BufferTable./Quality Parameter Code/ := qualityparasubform./Quality Paramater Code/;
                    BufferTable./Line No/ := qualityparasubform./Line No/;
                    BufferTable.Particulars := qualityparasubform.Particulars;
                    BufferTable./Approved Parameters/ := qualityparasubform./Approved Parameters/;
                    BufferTable./Unit of Measurement/ := qualityparasubform./Unit of Measurement/;
                    BufferTable.Remarks := qualityparasubform.Remarks;
                    BufferTable.Modify();
 
                end;
 
            until qualityparasubform.Next() = 0;













 
end;
 
    end;


 
}



 
I have the same question (0)

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans