web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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,419 User Group Leader 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
    27,507 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 677 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 521 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 306 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans