web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    Community Member Profile Picture
    on at
    RE: GET function

    In addition to answers given, if it is a setup table where the primary key is empty string, The syntax "Table.GET" makes the setup table Accessible to the code.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at
    RE: GET function

    Hi,

    It works based on Primary Key field

  • Suggested answer
    4BzSoftware Profile Picture
    6,073 on at
    RE: GET function

    Hi walidalam,

    The GET Function (Record) retrieves one record based on values of the primary key fields.

    Below links will provide you more information:

    msdn.microsoft.com/.../dd338616(v=nav.90).aspx

    msdn.microsoft.com/.../dd301056(v=nav.90).aspx

  • Community Member Profile Picture
    on at
    RE: GET function

    Ok, but what does Table1.GET("Entry No.",Table2."No.",Table3."No."); actually mean? Can you give me an easy example please? Thanks

  • Community Member Profile Picture
    on at
    RE: GET function

    Entry No is also part of primary key so it doesn't matter if the other 2 has same values , as long as the entry number is distinct.

  • Community Member Profile Picture
    on at
    RE: GET function

    Yes, but Table2."No." must be equal to Table3."No."?

  • Suggested answer
    Mohana Yadav Profile Picture
    60,937 Super User 2025 Season 2 on at
    RE: GET function

    no, it wont search in table 3 and 2.

    you need to have those record values by the time you use them in GET function.

    you need to take some training...

  • Community Member Profile Picture
    on at
    RE: GET function

    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

  • Suggested answer
    Mohana Yadav Profile Picture
    60,937 Super User 2025 Season 2 on at
    RE: GET function

    yes, syntax wise it will work..

  • Community Member Profile Picture
    on at
    RE: GET function

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

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans