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...
Answered

Find Record in table

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I'm want to check if record/get a record from the Purchase Lines table via the Document number.

The SQL table shows these 2 records on the Purchase Lines:

pastedimage1663155606704v2.png

I want to find the record with Document Number form the Purchase Line: PCT00049

pastedimage1663156199472v3.png

But it can't find the record..

Not sure if this has something to do with the trigger that is created as a page extension on the Commodity Receipt screen, where the Document number is linked with the action of the trigger

pastedimage1663156339900v4.png
Commodity Receipt Header

pastedimage1663156466444v6.png

pastedimage1663156393966v5.png

Kind Regards
Jaco

I have the same question (0)
  • Verified answer
    Amit Baru Profile Picture
    3,037 on at

    Hi,

    Rec.Setrange("Document No.",'PCT00049');

    if Rec.FindFirst then begin

    Message(Format(Rec.RecordID.getRecord()))

    Message('Order Found');

    end;

    Regards

    Amit Sharma

    www.erpconsultors.com

    press yes if info is useful.

  • JacoBosch Profile Picture
    55 on at

    Hi Amit, thanks

    Got it

    It is getting this record:

    pastedimage1663158378718v1.png

  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

    hi,

    Welcome

    Pls verify the answered. if useful.

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

#2
YUN ZHU Profile Picture

YUN ZHU 1,046 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 932 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans