Options

Job queue error on using Shell

chiosanchiosan Member Posts: 5
edited 2015-04-17 in NAV Three Tier
Hi everyone :)

My client has just upgraded from NAV 2009 classic to NAV2013R2.
And some of the job queue tasks got the error of "Client Callbacks are not supported on Microsoft Dynamics NAV server".
I know the COM automation is not supported and need to use Dotnet.
But I can't find a replacement of the Shell script automation. Can anyone give me a suggestion?
Here's the code using. Many thanks.
WshShell@1011 : Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{72C24DD5-D70A-438B-8A42-98424B88AFB8}:'Windows Script Host Object Model'.WshShell";
WshExec@1009 : Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{08FED191-BE19-11D3-A28B-00104BD35090}:'Windows Script Host Object Model'.WshExec";
  

IF ISCLEAR(WshShell) THEN
  CREATE(WshShell,FALSE,TRUE);

ConsolidatedReportingSetup.GET;
IF GUIALLOWED THEN BEGIN
  ConsolidatedReportingSetup.TESTFIELD("FTP Client Path");
  ConsolidatedReportingSetup.TESTFIELD("FTP Log File Path");
  ConsolidatedReportingSetup.TESTFIELD("Site Name");
  IF FTPDirectory = '' THEN
    ERROR(Text50030);
END;

WshExec := WshShell.Exec(ConsolidatedReportingSetup."FTP Client Path" + ' -s -O -site ' +
             ConsolidatedReportingSetup."Site Name" + ' -u ' + ConsolidatedReportingSetup."BI XML Path" +
             '*.xml' + ' -p ' + FTPDirectory + ' -log ' +
             ConsolidatedReportingSetup."FTP Log File Path");

WHILE (FORMAT(WshExec.Status) = '0') DO
  SLEEP(100);

CLEAR(WshExec);
CLEAR(WshShell);

Answers

Sign In or Register to comment.