Client Callbacks error with Dynamics NAV Page Web Services “Client callbacks are not supported on Microsoft Dynamics NAV Web Services”

Client Callbacks error with Dynamics NAV Page Web Services “Client callbacks are not supported on Microsoft Dynamics NAV Web Services”

IF THIS POST IS USEFUL AND HELPED YOU KINDLY LIKE AND SHARE THIS PAGE SO OTHERS CAN FIND IT, THANK YOU. NOTE: Click on image for a clearer view.

This article will demonstrate how to resolve the following error: “Client callbacks are not supported on Microsoft Dynamics NAV Web Services”. This usually occurs when you call code from a NAV Web Service that will cause a MESSAGE/CONFIRM/ERROR or other dialog box to open. Web Sevices cannot process these GUI elements. So you have to alter you code to use a GUIALLOWED. For example:

Old Code:

ERROR(‘File not found’);

New Code:

If GUIALLOWED then

ERROR(‘File not found’);

In my case I was using Codeunit 419 i received this error:

Here is a code snippet for the object that I changed. The yellow line resulted in a GUI request so I wrote my own code to delete the file (with blue lines).

28 Aug 2017: Update

I have an update on this. When the web site using this web service actually tried to call this function I still had errors. I tested on the local box and it seemed to work for me. But when using automation objects they have to run on client and cannot be envoked via a web service. So I had to change my code to use a dotnet variable to manage file actions:

New dotnet variable for file management:

Name DataType Subtype LengthName DataType Subtype LengthDotNetFileIO DotNet System.IO.Directory.’mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′

New code for Creating the directory:

New code for moving the files:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: