web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Why job queue OCR - Receive from Service set on hold after successful run?

(0) ShareShare
ReportReport
Posted on by 2,263

When job queue "OCR - Receive from Service" run once, it set's status "On hold". 

This is written here.

qst1.png

What is the logic behind this? 

This prevents NAV from automatically receive new documents from KOFAX...

*This post is locked for comments

I have the same question (0)
  • meemz Profile Picture
    on at

    Yes I am having the same issue. Which Codeunit is this code you mentioned above?

  • Verified answer
    dkatson Profile Picture
    2,263 on at

    Codeunit 881.

    So what I've done.

    I created New Codeunit "RestartJobAfterReceiveOCR"

    LOCAL [EventSubscriber] RestartJobQueueOCRReceiveFromServiceIfItSetsOnHold(VAR Rec : Record "Job Queue Entry";VAR xRec : Record "Job Queue Entry";RunTrigger : Boolean)
    
    IF NOT ((Rec."Object Type to Run" = 5) AND (Rec."Object ID to Run" = CODEUNIT::"OCR - Receive from Service")) THEN
    
     EXIT;
    
    IF Rec.Status <> Rec.Status::"On Hold" THEN
    
     EXIT;
    
    IF GUIALLOWED THEN
    
     EXIT;
    
    IF RunTrigger THEN
    
     EXIT;
    
    WaitUntilDocumentWillProceedOnOCRServiceSide();
    
    COMMIT;
    
    SetStatusOfJobQueueToReady(Rec);
    
    LOCAL WaitUntilDocumentWillProceedOnOCRServiceSide()
    
    SLEEP(10000);
    
    LOCAL SetStatusOfJobQueueToReady(VAR Rec : Record "Job Queue Entry")
    
    Rec.SetStatus(Rec.Status::Ready);

    And then I created extension from this, and installed on production

    Also there is an issue about this here, with some solution. But I find this solution "old fashioned"

    https://connect.microsoft.com/dynamicssuggestions/Feedback/Details/3118642 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans