Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Job Queue Entries

Posted on by 48
////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 97 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 56 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 17,965 Super User 2024 Season 2 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans