Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Job Queue Entries

Posted on by 6
////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 Profile Picture
    Matteo 28 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 52 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 11,250 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

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,652 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,573 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans