Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Answered

Getting .net issue during job queue process

Posted on by 405

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!!

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

    Thanks, it worked

  • Verified answer
    Hannes Holst Profile Picture
    Hannes Holst 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.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans