Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Job Queue Entries

Posted on by 24
////I am a Business Central Functional Consultant. When I try to run the existing job queue entries  codeunit no. 81, which converts blanket purchase orders to purchase orders, getting some error like given bellow picture  I need assistance. Please help me identify the problem 
 
the error msg is 
Job finished executing.
Status: Error
Error: Record(472) is not compatible with Codeunit.Run(Record(36)).
Categories:
  • Suggested answer
    Matteo Fiocco Profile Picture
    Matteo Fiocco 79 on at
    Job Queue Entries
    Hi,
     
    You cannot directly launch the specified codeunit from the job queue, because it expects table 36 as input. You need a developer to create a custom object.
     
    Bye
     
    Matteo Fiocco - Business Central Architect
    Blog : www.matteofiocco.com
    Linkedin :  https://www.linkedin.com/in/matfioc/
  • Verified answer
    JM Profile Picture
    JM 54 on at
    Job Queue Entries
    HI there!
     
    As Saurav explained, you can't just run like that. In your case, the JQ is expecting a certain record type to be passed to the codeunit, but the provided one is incorrect, it is expecting Sales Header (36) instead of Job Queue Entry (472).
     
    Creating a custom report / codeunit to invoke CU81 is the only way to go.
     
    Cheers!
    JM
  • Verified answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,613 User Group Leader on at
    Job Queue Entries
    Hi,
     
    You cannot just run any codeunit via job queue.
     
    For your request, you will have to create a custom report / codeunit, which runs based on Job Queue and then in-turn get the Sales Document and call Codeunit 81.
     
    Codeunit 81 runs on record for Data Item - Sales Header. Check the OnRun Trigger of object to understand why error. Codeunit 81 run based on Sales Header Record.
     
     
    Regards,
    Saurav Dhyani

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans