Dynamics NAV HOW TO Microsoft

HOW TO change data for all Companies in NAV

HOW TO change data for all Companies?

You have different ways to complete this task, the choice depends from how many lines or Companies you have. In the following steps I will explain you how to change data for all Companies in C/SIDE using the CHANGECOMPANY Function (Record):

  1. Create a new ProcessingOnly Report using with the System Table 2000000006 – Company as Data Source of a DataItem.
  2. Declare a C/AL Globals Variable of DataType Record with the table that you need.
  3. Insert the following code in the OnAfterGetRecord trigger


    [sourcecode lang=”Cside”]

    GLSetup.MODIFYALL("Allow Posting From", 010114D);
    GLSetup.MODIFYALL("Allow Posting To", 310114D);


    [sourcecode lang=”Cside”]


Here find another reading suggestion, this time in T-SQL: HOW TO run SQL query for multiple companies in NAV database

Did my HOW TO help you? Leave a reply.

One reply on “HOW TO change data for all Companies in NAV”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.