Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

AL code-Lines/Records have not been diaplaying on a page (part)

Posted on by Microsoft Employee

I am able to store records in a table, but not displayong on page. Any help.

trigger OnAfterGetRecord()
    var
        PWR: Record PostedWarrantyReg;
        PWRL: Record PostedWarrantyRegLines;
        PWRL1: Record PostedWarrantyRegLines;
        WR: Record WarrantyReg;
        WRL: Record WarrantyRegisterationLines;
        VarWR: Code[20];
    begin
        initprice := 0;
        WRL.Reset;
        PWRL1.Reset;
        WRL.SetRange(WRL.WarrantyRegNo, WarrantyRegNo);
        IF WRL.FINDSET THEN begin
            VarWR := WRL.WarrantyRegNo;
            /*   Message(VarWR); */
        end;
        PWRL1.SetRange(PWRL1.WarrantyRegNo, VarWR);
        IF PWRL1.FIND('-') THEN begin
            exit;
        end
        else
            IF WRL.FINDSET THEN begin
                REPEAT
                    PWRL.SETCURRENTKEY("No.");
                    IF PWRL.FINDLAST THEN Begin
                        PWRL.INIT;
                        PWRL."No." := PWRL."No." + 10;
                        PWRL."ItemNo." := WRL."ItemNo.";
                        PWRL.WarrantyRegNo := WRL.WarrantyRegNo;
                        PWRL.WarrantyFormNo := WRL.WarrantyFormNo;
                        PWRL.Price := WRL.CopyPrice;
                        PWRL.CopyPrice := WRL.CopyPrice;
                        PWRL.Insert;
                        CurrPage.Update();
                    End
                UNTIL WRL.NEXT = 0;
            end;
    end;

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: AL code-Lines/Records have not been diaplaying on a page (part)

    Explain what are you trying to do? and where you have added the above code?  provide more details.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans