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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

How to Update/Modify Data in All Companies

Mohana Yadav Profile Picture Mohana Yadav 60,993 Super User 2025 Season 2
We have Table 2000000006 - Company
 This table contains the names of all the companies that have been created in the current database.

And also we have CHANGECOMPANY Function

Redirects references to table data from one company to another.

[Ok :=] Record.CHANGECOMPANY([CompanyName])
We can create a ProcessingOnly report to update the data in all companies using above table and function.
Ex: If I have to Update "Allow Posting From" and "Allow Posting To" field of General Ledger Setup table in all companies then:
1. Create a Processing Only report with Company as dataitem
2. write below code in Company - OnAfterGetRecord() trigger
    
GLSetup.CHANGECOMPANY(Name);

GLSetup.MODIFYALL("Allow Posting From",010213D);
GLSetup.MODIFYALL("Allow Posting To",280213D);
//You can use variables in Request Form for From Date and To Date
Where GLSetup is global variable of record type variable with General Ledger Setup table.


This was originally posted here.

Comments

*This post is locked for comments