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

'Page' does not contain a definition for "APIV2 - Purchase Invoices"

(0) ShareShare
ReportReport
Posted on by 19

I am getting this error "'Page' does not contain a definition for "APIV2 - Purchase Invoices" when i am trying to use the below method in my custom API, any clue why this is happening?

error line : ActionContext.SetObjectId(Page::"APIV2 - Purchase Invoices");

local procedure SetActionResponse(var ActionContext: WebServiceActionContext; InvoiceId: Guid)
    var
    begin
        ActionContext.SetObjectType(ObjectType:: Page);
        ActionContext.SetObjectId(Page::"APIV2 - Purchase Invoices");
        ActionContext.AddEntityKey(FieldNo(Id), InvoiceId);
        ActionContext.SetResultCode(WebServiceActionResultCode::Deleted);
    end;
I have the same question (0)
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 on at

    Hope this helps.

    [View:https://youtu.be/TSQiE42tDwU:320:240]

  • Andrew1986 Profile Picture
    63 on at

    Guys, thanks for the resource links.
    But, I am not a developer, but a business analyst.

    Could you explain in simple terms what needs to be done to make the objects with IDs 30011, 30009, 30012, and 20023 appear on the Web Services page in Business Central?
    We have switched to API version V2, but I don't see these objects on the Web Services page interface when I select the object type PAGE.

    This screen includes 30012.
    But in my case, their absent.

  • Gerardo Rentería García Profile Picture
    25,236 Most Valuable Professional on at
    Hi
    They are not visible on this page, and will not be. They are pages that are available to be consumed from external media. Whether it is a third-party application, powerplatform, you can test it through tools like postman and others.
    BR
    GR

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,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans