Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Explanation about RecordRef

Posted on by 130

What is the difference between RecordRef and Rec, and how do we use the RecordRef  in AL. please share the example of Recordref in Al.

Categories:
  • Verified answer
    P V Sarath Profile Picture
    P V Sarath 130 on at
    RE: Explanation about RecordRef

    Thank you for your Explanation.

  • Suggested answer
    matthias_rabus Profile Picture
    matthias_rabus 160 on at
    RE: Explanation about RecordRef

    The most important difference is that a Record is hard wired to a table when it is declared in the code, while a RecordRef can change its table during runtime, e.g. based on a setup table.

    Check this example from the docs:

    docs.microsoft.com/.../recordref-gettable-method

    The variable GLAcc is hard wired to „G/L Account“, while the RecRef variable is set to a table using the GetTable method.

    If you have a specific issue/question, just ask

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,155 on at
    RE: Explanation about RecordRef

    Small explanation here but has an example of it in action to cement understanding: https://youtu.be/GwUx2Or4TFI

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans