Skip to main content

Notifications

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

  • Suggested answer
    Amit Baru Profile Picture
    3,029 on at
    RE: Find Record in table

    hi,

    Welcome

    Pls verify the answered. if useful.

  • JacoBosch Profile Picture
    55 on at
    RE: Find Record in table

    Hi Amit, thanks

    Got it

    It is getting this record:

    pastedimage1663158378718v1.png

  • Verified answer
    Amit Baru Profile Picture
    3,029 on at
    RE: Find Record in table

    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.

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,017 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,852 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans