Externally adding to the NAV system

Ok getting closer, I think it’s actually now attempting to run it, now in the log I get:

“User pk has not been setup to be allowed to run CodeUnit 70401 - V1Import”

Yet I’m logging in to the client as pk, the pk user is how I’m authenticating into SQL so what do I have to do to give pk permissions to run the CodeUnit?

What account is the NAS running under? You have to give appropriate permissions to the service account. I’m guessing that that is a custom error message or you have paraphrased.

Hi Matt,

Sorry HERE is a screen shot of actual error in the Job Queue.

The NAS is running as the Administrator account which is the login to the Server I’m using.

What I need to understand is what needs permission to do what and where to set it …

If NAS is running under Administrator then Administrator needs to be setup to be able to run that Codeunit. Otherwise you need to run the NAS Service under the PK username.

The service account is equivalent to the user who has opened up the system. A NAS logs into the database with that service account, but just doesn’t open up a GUI.

Great, put an Administrator user in with the same password as the user one, all environments now share the same login (NAS service, SQL and Client.)

It seems to get a bit futher by actually referring to the correct CU: HERE but still no luck.

I think it might be this: http://www.mibuso.com/forum/viewtopic.php?f=32&t=32789

I didn’t have anything in my CU referring to the job, it mentions:

“job queue entry record for the onrun function”

Is that just the CU ID? Do I need anything else referring to the job in my CU OnRun code?

SUCCESS!

I just added paramaters to the CU OnRun “Job Queue Entry”

Added the name of it as a parameter on the Job Card and blow me down with a kipper, it worked a treat!

Matt, you’re the man!!!