Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Inserting records via web services

Posted on by 5

Hey all,

So I have been messing around with the API and exposing different pages to pull data from. As a test I tried to send a post request to the opportunity comments page as it seemed simple.

I get an error that the page doesn’t support insert. I tried extending the page with editable true to no avail.

I get that there are some tables they would rightly disallow inserts, updates or deletions, such as GL entries, or anything posted really.

If I made my own page referencing the same table would I be able to post data to it? Or would I need to make my own table and page for that?

Or am I way off and I can totally post to the comments page, I’m just doing it wrong.

Lastly is there a page that shows table/page properties so I know which ones I can fully interact with?

thank you so much for any guidance you can offer and thank you for reading this long winded question haha

  • James ODonnell Profile Picture
    James ODonnell 5 on at
    RE: Inserting records via web services

    Just in case anyone else comes to this question. I found something that helped so much. In addition to the resources linked in the comments, I found out that if, while you are in VS Code you can few the source AL for any table, page, report, etc.

    Just start an AL project and reference the table, page, etc you want to see like so:

    pageextension 50131 Test extends "Opportunity Card"

    {

    }

    Now if you click anywhere in "Opportunity Card" and press F12 it will open the AL for that page. Really helpful if you are wondering what is going on behind the scenes.

  • James ODonnell Profile Picture
    James ODonnell 5 on at
    RE: Inserting records via web services

    Thank you so much for the info, been going through it over the weekend. I wish I had asked this question a week ago haha. Have a great day!

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: Inserting records via web services

    Hi, you can try table 2000000138 “Page Metadata”.

    https://yzhums.com/22845/

    This is a system table for viewing all page information in BC.

    pastedimage1650847004918v1.png

    pastedimage1650847015407v2.png

    And for standard apis in BC, hope the following will help.

    https://yzhums.com/6117/

    Thanks.

    ZHU

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Inserting records via web services

    You might want to review how the standard api pages work. Majority include triggers to handle all the CRUD operations: github.com/.../pages

    It’s a few years old now but I still find this blog helpful: community.dynamics.com/.../how-to-create-custom-apis-for-business-central-even-from-macos

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