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 :
Small and medium business | Business Central, N...
Suggested Answer

Get links on items on a web service

(0) ShareShare
ReportReport
Posted on by 555

Hi experts,

This is regarding Business Central cloud.

On an item, you can make several links to files on some public server.

I would like to make these records available for a web service. How do I do that?

I can see that this has something to do with the table "Record Link" (number 2000000068). But I need to show the item number, description and the link to the file.

Hope, someone can help.

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    There is no standard API that gives you this information. So the best approach is to use a custom API for this:

    docs.microsoft.com/.../devenv-develop-custom-api

    Then you can make a API that you use the Item No. as a input and return the Item no. description and links.

  • Suggested answer
    YUN ZHU Profile Picture
    95,597 Super User 2025 Season 2 on at

    Hi, hope the link below can give you some inspiration.

       

    Thanks.

    ZHU

  • Morten Steengaard Profile Picture
    555 on at

    Thank you very much NorthW and YUN ZHU for your reply.

    I still need to understand the table relations.

    On one of my items, I have made two links to files on another server.

    I have an Item record (no. 27). And I can see two records in the table "Record Link" (no. 2000000068).

    But what is the link between table "Item" and table "Record Link"?

    And when I have the "Record Link" record, how do I find the link (eg. "www.myServer.com\theFile.pdf")?

    Hope you can help.

  • Morten Steengaard Profile Picture
    555 on at

    Problem solved.

    On the table "Record Link" there is a field called URL1. That contains the URL. I simply missed that.

    Furthermore there is a field called "Record ID". I use that to get the Item-record like this where Rec is the "Record Link" table:

       trigger OnAfterGetRecord()

       var

           RecordRef: RecordRef;

           MyFieldRef: FieldRef;

       begin

           if Rec.Type = Rec.Type::Link then begin

               RecordRef.Open(Database::Item);

               if RecordRef.Get(Rec."Record ID") then begin

                   MyFieldRef := RecordRef.Field(1);   // 1 = "No."

                   ItemNumber := MyFieldRef.Value;

               end;

           end;

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,917

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,161 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,025 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans