How to use the same code for many COMPANY in a Database

SuperSage77SuperSage77 Member Posts: 101
Hello!

Is it possible to use a same code (in a CodeUnit), and launch it for alls Companies in a database ?

Thanks for response!

R.weinling

Answers

  • davmac1davmac1 Member Posts: 1,283
    Could you provide more detail on what you are trying to accomplish?
    The code is common to all companies in a NAV database.
    If you want a procedure to run against all companies one by one, you can accomplish that by a loop that reads the Company table (not company info) and then using changecompany. This is somewhat limited since you change company for each table and any logic that uses another table uses the original company - but with care, it can be done.
Sign In or Register to comment.