Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Issue in instantiate a class when using the job queue

Posted on by 23,116

I have created a DLL and in that I have a class this class take a few values in and do some processing.  

I created a codeunit in NAV and define DLL as a DOTNET variable and then instantiate the classes. After that I called the methods inside those classes. When I run the codeunit it works perfectly fine. 

But my problem is when I try to run the codeunit with a Job Queue. 

It throw a error saying

"Error message: Microsoft Dynamics NAV Server attempted to issue a client callback to create a DotNet object: bulkSMSGatewayHTTP_dll.clsAlertListNAV (CodeUnit 50000 SMS Alert Management). Client callbacks are not supported on Microsoft Dynamics NAV Server"

This error throws at the line of where i Instantiate the class files. 

 

How to overcome this issue? 

This is regarding NAV 2015

*This post is locked for comments

  • TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Issue in instantiate a class when using the job queue

    Yes. I had all the DLL in the servicep-addin-folder. I feel like this is a bug in NAV

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Issue in instantiate a class when using the job queue

    hi,

    i tried it for my self and got the same error.

    then, i copied the dll to the service-addin-folder (C:\Program Files\Microsoft Dynamics NAV\70\Service\Add-ins) and it was working.

    did you copy the dll to the service-addin-folder?

  • Verified answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Issue in instantiate a class when using the job queue

    Thanks for the help guys. It was very strange thing. I copied my code to a notepad and then deleted my codeunit. After that I created a new codeunit with a new ID and pasted my code.

    And now its working. Very strange.

    I think something to do with cache memory.

    Anyway thanks for the help.  

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Issue in instantiate a class when using the job queue

    please write the (main) c/al code with the dotnet-var. call. and the list of the used variables and (sub-)types. does changing the runonclient property influence the behavior?

  • TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Issue in instantiate a class when using the job queue

    No. I check the code and there is nothing like that.

  • Rashed Profile Picture
    Rashed 3,765 on at
    RE: Issue in instantiate a class when using the job queue

    Are there any windows/dialog/ status opening during the process?  NAS cannot open any windows dialog.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans