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

Community site session details

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

Failure while emitting method. Object:'Page ""' Method:'OnAction()' in Business Central Cloud Publishing

(0) ShareShare
ReportReport
Posted on by 13

Hi,

I am working custom extension on Business central for Cloud. In visual studio after all the objects are created and an app created with Cntl Shift B. it working fine but when I press Control F5, it is giving error 

'Failure while emitting method. Object:'Page "XXX-Sales Invoices"' Method:'OnAction()''

F5Error1.jpg

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    on at
    RE: Failure while emitting method. Object:'Page ""' Method:'OnAction()' in Business Central Cloud Publishing

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    I will open this up to the community in case they have something to add.

  • Suggested answer
    DAnny3211 Profile Picture
    11,389 on at
    RE: Failure while emitting method. Object:'Page ""' Method:'OnAction()' in Business Central Cloud Publishing

    Hi

    The error message displayed suggests that there may be a problem with the code of the OnAction() method of the 'XXX-Sales Invoices' page object in the extension.

    I will list some suggestions

    Check the code of the OnAction() method in Visual Studio for syntax errors or other problems. You can do this by opening the page object and navigating to the code of the OnAction() method.

    Try rebuilding the extension by pressing Ctrl + Shift + B again to check for compilation errors or warnings in the code.

    If the problem persists, try setting a breakpoint in the OnAction() method to see if you can locate where the error occurs.

    Make sure that all the dependencies of the extension are set up and configured correctly, including the necessary libraries or packages.

    If problems persist, you can try debugging the extension with the Visual Studio debugger to see if you can get more information on the cause of the error.

    I hope this helps! Let me know if you have any further questions.

    Daniele

  • Suggested answer
    YUN ZHU Profile Picture
    93,820 Super User 2025 Season 2 on at
    RE: Failure while emitting method. Object:'Page ""' Method:'OnAction()' in Business Central Cloud Publishing

    Hi, hope the following helps.

       

    https://yzhums.com/8391/

    https://yzhums.com/6861/

    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

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,179

#2
OussamaSabbouh Profile Picture

OussamaSabbouh 1,999

#3
YUN ZHU Profile Picture

YUN ZHU 1,892 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans