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 :
Microsoft Dynamics NAV (Archived)

GET function

(0) ShareShare
ReportReport
Posted on by

Hi! I'm new in C/AL programming. Can anyone explain me the GET function, not like the "help" in nav? Thank you!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    When we know the all primary key field values of a record we use GET function like if you know customer no. then

    Customer.GET('XXX');

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    GET Function is used for finding the record based on Keys.

    No need to use any filters like, SETRANGE.

    Always searches through all the records in a table.

  • Community Member Profile Picture
    on at

    Thanks! What does Table1.GET("Entry No.",Table2."No.") mean?

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Here, Table2."No." return a value that value are going to search on Table1.

    For Example

    Table1.GET("Entry No.",Table2."No.");

    OR

    Table1.GET("Entry No.",'Xyz123'); //Table2."No."

  • Suggested answer
    Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    most importantly Table1 should have 2 fields in primary key which matches "Entry No." and Table2."No.".

  • Community Member Profile Picture
    on at

    Does Table1.GET("Entry No.",Table2."No.",Table3."No."); have any sense?

  • Suggested answer
    Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    as I mentioned, you need to exactly pass no. of primary key fields.

    if your primary key has 2 fields and pass 3 then wont work.

  • Community Member Profile Picture
    on at

    And if the primary key has 3 fields, then would this work?

  • Suggested answer
    Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    yes, syntax wise it will work..

  • Community Member Profile Picture
    on at

    So, in this case, the same value is searched in both tables 3 and table 2 and then it is searched in the entry no of table 1? Thanks

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans