Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Item attachment section (notes) - Load data into Power BI

(0) ShareShare
ReportReport
Posted on by 40

Hi,

I'm trying to load data from the attachment section of an Item (notes, marked in red below) into Power BI but I can't find that page in webservices to get the data from.


I saw on another post that there's a table called "Record Link" but I can't find that table in Webservices. Is it because I don't have the access to it or it's really not available to be read via odata?

pastedimage1661454148193v1.png

Thanks,

Mariana

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Item attachment section (notes) - Load data into Power BI

    I created an api page and connected to that. I’d get support from someone technical so you can do similar.

  • mmarques Profile Picture
    mmarques 40 on at
    RE: Item attachment section (notes) - Load data into Power BI

    Thank you Josh! Great that you got it to work... I'm sorry but I'm a bit lost even after Steven's article. Did you connect to Power BI via webservices?

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Item attachment section (notes) - Load data into Power BI

    You get results using the code Steven provided in his blog. However, it is doubling up on the results so that part needs a review at least:

    pastedimage1661526940361v1.png

    In my case the doubling up is down to some bad data. In any case it is probably best to have an additional filter in place on the recordlink table like so:

    RecordLink.SetRange("Record ID", MyRec.RecordId());
    RecordLink.SetRange(Type, RecordLink.Type::Note);
    //New filter to isolate notes only from the current company context
    RecordLink.SetRange(Company,CompanyName);

  • Suggested answer
    Steven Renders Profile Picture
    Steven Renders 5,051 Super User 2024 Season 1 on at
    RE: Item attachment section (notes) - Load data into Power BI

    APIs are 'faster' then web services in theory, but behind the scenes both are odata ;-)

    Queries are in many cases better then pages because queries can aggregate data (group-by & sum).

    Images/Notes in Record links are stored encoded, so even if you create an API/webservice it might not work in Power BI.

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Item attachment section (notes) - Load data into Power BI

    This is a good guide on how to get the data. As Yun as said an api page is required/best future plan. The code in the post could be adapted to retrieve the details in an api page

    https://thinkaboutit.be/2019/03/how-do-i-use-record-notes-in-an-al-page-or-report/

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,036 Super User 2024 Season 2 on at
    RE: Item attachment section (notes) - Load data into Power BI

    Hi, Standard Web Services and APIs do not correspond to all tables in the system. If you need to, you can create new pages and publish them to Web Services, or create APIs pages directly. I personally recommend APIs pages because its performance is much better than OData.

    Hope this helps.

    Thanks.

    ZHU

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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans