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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Record is not compatible with Codeunit.Run(Record(37) error

(0) ShareShare
ReportReport
Posted on by 15

I'm getting an error while creating batch jobs in business central 'Record(472) is not compatible with Codeunit.Run(Record(37) error' 

I am trying to ship SO through batch jobs. In job queue entries If I use 'report' as object type to run and select object type to run '296' (batch post sales order) The SO is posting (and invoicing) and a shipment is also creating but no pick list is generating (pick toggle is set to yes on warehouse and it does create picking list when SO is manually created)

I want to ship SO but with segregated processes

1. Batch job SO release - object Id to run '414' (release sales document)

2. Batch job creation of WH shipment - object id to run '64' (sales - get shipment)

3. Batch job creation of pick list -  object id to run '5778' whse - create pick

4. Batch job registration of picking list -  object id to run isnt available

5. Batch job posting of WH shipment -  object id to run '5763' (whse - post shipment)

These processes are present in object type to run 'codeunit' but on selecting any of the object types to run, I get the above mentioned error 'Record(472) is not compatible with Codeunit.Run(Record(37) error' as soon as I set the status to ready (after changing time and dates)

pastedimage1599549304436v1.png 

pastedimage1599549740502v2.png

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,949 Super User 2025 Season 2 on at
    RE: Record is not compatible with Codeunit.Run(Record(37) error

    it seems like you are calling a function which has parameter as record 472 but you are passing record 37.

    which function are you calling?

  • Ayesha Naeem Profile Picture
    15 on at
    RE: Record is not compatible with Codeunit.Run(Record(37) error

    When object type to run code unit is selected, for all of the 'object id's to run' mentioned above I get the same error that record is not compatible. 

  • MarisolC Profile Picture
    103 on at
    RE: Record is not compatible with Codeunit.Run(Record(37) error

    Were you able to solve this? Would you mind sharing how did you make it work? Thanks!

  • Predator75 Profile Picture
    35 on at
    RE: Record is not compatible with Codeunit.Run(Record(37) error

    The record 472 is from the Job Queue Entry table. The Codeunit is expecting the table 37 (Sales Line). I rewrote the Codeunit to use the TableNo = Job Queue Entry and the error went away.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,237

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,425

#3
Sumit Singh Profile Picture

Sumit Singh 2,907

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans