web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Getting .net issue during job queue process

(0) ShareShare
ReportReport
Posted on by 425

Hi Everyone,

Have created a codeunit to import file and move processed file to another location. When i run the codeunit manually, it works correctly.

But when i set this codeunit on job queue, it give blow error:


"Microsoft Dynamics NAV Server attempted to issue a client callback to create a DotNet object: System.IO.File (CodeUnit 419 File Management). Client callbacks are not supported on Microsoft Dynamics NAV Server."

Code written in codeunit:

  FileMgt.MoveFile(GLSetup."Import File Path"+RecFile.Name,GLSetup."Import File Path"+'Processed\'+'Processed_'+ RecFile.Name)

Thanks!!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Hannes Holst Profile Picture
    5,767 on at
    RE: Getting .net issue during job queue process

    Hi,

    It's maybe because the function "MoveFile" is designed to be used by the Client only.

    Try the function "CopyServerFile" and check if it does the job.

  • Manish Ratan Profile Picture
    425 on at
    RE: Getting .net issue during job queue process

    Thanks, it worked

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans