Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

GET function

Posted on by Microsoft Employee

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

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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
    Amol Salvi 18,694 on at
    RE: GET function

    Hi,

    It works based on Primary Key field

  • Suggested answer
    4BzSoftware Profile Picture
    4BzSoftware 6,071 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
    Community Member Microsoft Employee 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
    Community Member Microsoft Employee 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
    Community Member Microsoft Employee on at
    RE: GET function

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

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 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
    Community Member Microsoft Employee 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
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: GET function

    yes, syntax wise it will work..

  • Community Member Profile Picture
    Community Member Microsoft Employee 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans