Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

PATCH to ODataV4 web service - Application_CallbackNotAllowed

Posted on by 25

Hi all. 

When updating the Shipment Date of a Sales Order (Sales Header table) which has a linked assembly order, the error message I'm receiving is "...Error uploading changes to BC. { "code": "Application_CallbackNotAllowed", "message": "Microsoft Dynamics 365 Business Central Data Services attempted to issue a client callback to show a confirmation dialog box: The status of the linked assembly order will be changed to Open. Do you want to continue? (Table 904 Assemble-to-Order Link). Client callbacks are not supported on Microsoft Dynamics 365 Business Central Data Services....".

Is there a way to confirm(preferred)/deny/bypass popup dialogs when patching a webservice?

Thank you.

  • slashtechllc Profile Picture
    slashtechllc 25 on at
    RE: PATCH to ODataV4 web service - Application_CallbackNotAllowed

    Thank you sir! 

    It's my understanding that in your example, you're turning off the confirmation dialog entirely at the table-level, regardless of GUI usage.

    Based on this example, I determined that I could extend table 904 "Assemble-to-Order link" to disallow the dialog if not accessed via the GUI.  I attempted to do so, but am still getting the error when patching the record via web service, so I assume I did something incorrectly.  Your advice is very much appreciated.

    tableextension 50109 ExtendAssembleToOrderLink extends "Assemble-to-Order Link"
    {
        var
            AsmHeader: Record "Assembly Header";
            Text006: Label 'The status of the linked assembly order will be changed to %1. Do you want to continue?';
            HideConfirm: Boolean;
        local procedure AsmReopenIfReleased()
        var
            ItemCheckAvail: Codeunit "Item-Check Avail.";
            ReleaseAssemblyDoc: Codeunit "Release Assembly Document";
        begin
            if AsmHeader.Status <> AsmHeader.Status::Released then
                exit;
            if GuiAllowed then
                if not HideConfirm then
                    if not Confirm(Text006, false, AsmHeader.Status::Open) then
                        ItemCheckAvail.RaiseUpdateInterruptedError;
            ReleaseAssemblyDoc.Reopen(AsmHeader);
        end;
    }
    Results in:
    {
        "error": {
            "code""Application_CallbackNotAllowed",
            "message""Microsoft Dynamics 365 Business Central Data Services attempted to issue a client callback to show a confirmation dialog box: The status of the linked assembly order will be changed to Open. Do you want to continue? (Table 904 Assemble-to-Order Link). Client callbacks are not supported on Microsoft Dynamics 365 Business Central Data Services.  CorrelationId:  41c745ad-1e71-4230-8e5d-dbc4ce4d8c24."
        }
    }
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: PATCH to ODataV4 web service - Application_CallbackNotAllowed

    Hi,  If this Web Service is your custom page, you can bypass this dialog with the System.GuiAllowed() Method.

    More details:

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-guiallowed-method

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/handling-ui-interaction-when-working-with-web-services#publishing-web-services

    If this is a standard page, I think you'll need to customize it to bypass popup dialogs.

    A simple example:

    https://yzhums.com/12853/

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Andy Sather Profile Picture
    Andy Sather on at
    RE: PATCH to ODataV4 web service - Application_CallbackNotAllowed

    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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans