Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Get Record ID from Record Link table[NAV 2013]

Posted on by 60

Hi All,

I am trying to insert the note data by code, as I know that this should go into Record Link table. But I don't know how to get the data for Record ID colum.

Any suggestion for this?

Thank you,

Ko

*This post is locked for comments

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Get Record ID from Record Link table[NAV 2013]

    Lets say you want to add recordLink for Customer 10000

    Then

    Cust.GET('10000');

    RecRef.GETTABLE(Cust);

    RecordLink.INIT;

    RecordLink."Record ID" := RecRef.RECORDID;

    .....

    RecordLink.INSERT;

    Where Cust is record type variable Customer

    RecRef is RecordRef

    RecordLink is record type variable Record Link

  • worawit Profile Picture
    worawit 60 on at
    RE: Get Record ID from Record Link table[NAV 2013]

    Thank you so much for the answer Jens.

    But I think I don't get what you mean, I am very new to coding with Navision. The thing I need to do is, I am writing the application that can insert the Note data directly to NAV database. So, Im need to know how Record ID colum link to the each customer in Customer table and how to convert the Customer ID into Record ID.

    Best Regards,

    Ko

  • Suggested answer
    Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: Get Record ID from Record Link table[NAV 2013]

    Hi Ko,

    you can AFAIK only get a RecordID from a RecordRef. So, the way would be to set a RecordRef to the record that you have with GETTABLE, and then get the RecordID from the RecordRef. I would recommend to use the RecordRef as a local variable.

    with best regards

    Jens

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