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

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 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans