Skip to main content

Notifications

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

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

Posted on by 83

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
    YUN ZHU Profile Picture
    YUN ZHU 73,378 Super User 2024 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

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 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
    Andy Sather Profile Picture
    Andy Sather 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.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,232 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans