AL icon indicating copy to clipboard operation
AL copied to clipboard

How Can I get Client Directory Files List (with JOB queue)

Open czeslaw6300149 opened this issue 8 years ago • 2 comments

Hi, I want to know is there any solution to get Client Directory Files List (with JOB queue)?

When I Create a Codeunit name "MyTest" (maybe 89999) , and use "File Management"( Codeunit 419) procedure "GetClientDirectoryFilesList".

ex: codeunit 89999 MyTest { trigger OnRun(); var NameValueBuffer : record "Name/Value Buffer"; FileManagement : codunit "File Management"; begin FileManagement.GetClientDirectoryFilesList( NameValueBuffer, --FolderPath--); end; }

Then I create a button to run MyTest on a page (maybe 9001).

It work fine, And I can find list in "Name/Value Buffer" (Table 823).

But when I Create a job queue to run MyTest, It Can't Find folder any more.

Always Return Error.

Is possible to slove this question? Or if not possible, how can I do?

PS:I'm using CU5, and "AL Language" version is 0.12.20065

czeslaw6300149 avatar Jun 28 '18 08:06 czeslaw6300149

Hi

Dot net variables with RunOnClient = Yes cannot be used in Web Client & in NAS (Job Queue), but it can be used in Windows Client. So try to use GetServerDirectoryFilesList function it will work in Job Queue. I hope you have tested this in Windows Client right?.

In web client you might get the below error: The operation cannot complete because it uses a feature that is not supported (.NET Framework Interoperability.)

diveshbora avatar Jul 02 '18 07:07 diveshbora

Correct, closing the issue.

defr0std avatar Sep 05 '18 14:09 defr0std