Options

NAV2015: How to use "Job Queue Log Entry" to log if one records fails in a run through??

BrianResenBrianResen Member Posts: 9
edited 2017-05-08 in NAV Three Tier
I'm trying to log if individuel records in an Job Queue run Codeunit cannot be processed. But when trying to log errors in "Job Queue Log Entry" I'm missing access to info for JobQueueLogEntry."Job Queue Code". Since the job is run through STARTSESSION I'm having no way of knowing which Job started my Codeunit...
Does anyone know of a workaround? - Thanks in advance ;-)
>>None but a fool worries about things they cannot influence...<< - Samuel Johnson

Best Answer

  • Options
    BrianResenBrianResen Member Posts: 9
    Answer ✓
    Found something that's not 100% but close enough B)
    When a Job starts it first places an Job Queue Log Entry with the Status::"In Process". That one I can look up and reuse in my codeunit to insert "Job Queue Log Entry"' entries of my own...
    Think it could work so that's the way it's going to be o:)
    >>None but a fool worries about things they cannot influence...<< - Samuel Johnson

Answers

  • Options
    BrianResenBrianResen Member Posts: 9
    Answer ✓
    Found something that's not 100% but close enough B)
    When a Job starts it first places an Job Queue Log Entry with the Status::"In Process". That one I can look up and reuse in my codeunit to insert "Job Queue Log Entry"' entries of my own...
    Think it could work so that's the way it's going to be o:)
    >>None but a fool worries about things they cannot influence...<< - Samuel Johnson
Sign In or Register to comment.