Use of Parameter String in Job Queue

sunctsunct Member Posts: 72
Hi,

I have a problem with using Parameter String in Job Queue.
I want the value entered in Parameter String to be available in the codeunit which is specified in Job Queue Entry. My Job Queue Entry is as below -

Object Type to Run Codeunit
Object ID to Run 50040
Parameter String C11-Import

And my codeunit 50040 is as below -


Documentation()

OnRun(VAR Rec : Record "Job Queue Entry")


ParameterString := "Parameter String";


test.Process := "Parameter String";
test.INSERT;

But I am not getting the value in Parameter String inserted to the Process field in table test after the job runs. The job queue is running and Job Queue log entry is generating. But I am not getting the values in Parameter String which I need to use for further process. ](*,)


Any help please?

Thanks in advance
Regards,
Sunil

Comments

  • matttraxmatttrax Member Posts: 2,309
    Have you stepped through the debugger to see the values of your variables? Maybe it's working just fine but "Parameter String" is reset somewhere before you insert it into the table.
  • sunctsunct Member Posts: 72
    How the debugger can be used when the Job Queue is run through NAS?
    Regards,
    Sunil
  • matttraxmatttrax Member Posts: 2,309
    Good call :oops:

    Same thing still holds, though. Are you sure your variable is not getting reset?

    You assign "Parameter String" to the variable ParameterString, but then use the original variable later on. There must be some reason it is copied to another variable.
  • sunctsunct Member Posts: 72
    Hi,

    I need the value assigned to a variable. However, in both cases it is not working. It is sure, the variable is not getting reset. This is the first time I am using this module and really dont have much idea how it will work. I thought I will be able to get the Parameter String value into this codeunit and can use it for further processing.

    Thanks,
    Regards,
    Sunil
  • DenSterDenSter Member Posts: 8,307
    sunct wrote:
    How the debugger can be used when the Job Queue is run through NAS?
    Read the w1w1atas.pdf document (it's in the Doc folder), it will tell you how to do that.

    If you can't figure that out, you can always run the process in a regular client with the debugger on.
  • KTA8KTA8 Member Posts: 397
    I have the same issue, have you solved it?
Sign In or Register to comment.