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

Announcements

No record found.

News and Announcements icon
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 23

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

  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    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,427 Super User 2026 Season 1 on at

    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
    103,829 Super User 2026 Season 2 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 728 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 545 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 328 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans