Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)
Suggested answer

Client Callbacks issue with Page Web Services

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

I'm working on NAV 2013.

Creating unit test on the basis of web services in Visual Studio, that is created by exposing the Page as WS.

I have exposed page "FileShipmentModCard" as a WS, and writing the unit test.

I have created PortClient obj and FileShipmentModCard instance to work with it

so while creating new FileShipmentModalCard, getting the error in dotnet as bellow

Code is as bellow:

//File Shipment Mod. Card
FileShipmentModCard.FileShipmentModCard_PortClient fileShipmentModCardService = new FileShipmentModCard.FileShipmentModCard_PortClient();
FileShipmentModCard.FileShipmentModCard newFileShipmentModCard = new FileShipmentModCard.FileShipmentModCard();

fileShipmentModCardService.Create(ref newFileShipmentModCard); // Error comes here


Can anyone any idea how to fix this issue? Thanks!

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Client Callbacks issue with Page Web Services

    Hi,

    Even i am facing same problem when i am trying to create Service Contract from soap using the web service published using (Page).

    The response i got when i try to create Service contract using soap:

    <s:Envelope xmlns:s="schemas.xmlsoap.org/.../&quot;>

      <s:Body>

         <s:Fault>

            <faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLCallbackNotAllowedException</faultcode>

            <faultstring xml:lang="en-US">Microsoft Dynamics NAV Business Web Services attempted to issue a client callback to show a confirmation dialog box: Do you want to create the contract using a contract template? (Table 5965 Service Contract Header). Client callbacks are not supported on Microsoft Dynamics NAV Business Web Services.</faultstring>

            <detail>

               <string xmlns="schemas.microsoft.com/.../&quot;>Microsoft Dynamics NAV Business Web Services attempted to issue a client callback to show a confirmation dialog box: Do you want to create the contract using a contract template? (Table 5965 Service Contract Header). Client callbacks are not supported on Microsoft Dynamics NAV Business Web Services.</string>

            </detail>

         </s:Fault>

      </s:Body>

    </s:Envelope>

    If i try to create in Navision 2013 studio, it is asking for do you want to create contract using contract template.

  • Tharanga Chandrasekara Profile Picture
    Tharanga Chandrasekara 23,116 on at
    RE: Client Callbacks issue with Page Web Services

    Kindly verify answers.

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    Tharanga Chandrasekara 23,116 on at
    RE: Client Callbacks issue with Page Web Services

    In Dynamics NAV you can publish pages,  codeunits and queries as web services and yes you can add the C/AL coding in the pages as well. Check below link on Dynamics NAV web services.

    msdn.microsoft.com/.../dd355398(v=nav.80).aspx

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Client Callbacks issue with Page Web Services

    hi zishan,

    you can publish nav pages (and queries) as web service too and you can also add/change code in the pages if needed, especially code parts, where error/message/confirm is used.

    for better simulating page actions you can write an extension codeunit.

    follow msdn.microsoft.com/.../dd338962(v=nav.70).aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Client Callbacks issue with Page Web Services

    Hi Archer,

    Thanks for the guidance, FYI I'm not using toolset for testing, rather we're working on VS2013 to write unit test over published WS. but yes we can change C/AL code in code units or page as needed. so in dev. envt. can we refer the code for page too? if yes pls. suggest how?

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Client Callbacks issue with Page Web Services

    did you try the nav 2013 test toolset for testing ?

    blogs.msdn.com/.../application-test-toolset-for-microsoft-dynamics-nav-2013.aspx

    for usage of the web service: check the oninsert trigger of the published page for commands message, error,... if you find one then replace e.g.

    message(...

    by

    if guiallowed then

     message(...

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Client Callbacks issue with Page Web Services

    When I click on New button on the Page "File Shipment Mod. Card" it opens transport type page, after selecting transport type page it redirects me to the "File Shipment Mod. Card". So the error occurred in code fileShipmentModCardService.Create(ref newFileShipmentModCard);. for that which object should I look for to disable the GUIALLOWED function or any dialogue to be hidden? As I'm new to NAV, not able to figure out, Pls. suggest me the root cause. Thanks.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,076 Super User 2025 Season 1 on at
    RE: Client Callbacks issue with Page Web Services

    Did you check GUIALLOWED functions?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Client Callbacks issue with Page Web Services

    How to handle message/error/confirm dialogues in cal code? can you please suggest a link write here?

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Client Callbacks issue with Page Web Services

    means that a message/error/confirm is called and invisible shown. a user interaction is needed.

    so check the code and everywhere you find a message/error/confirm add a GUIALLOWED to check if a standard client is the caller.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans