Edit, Delete and create new always in a particular company

Requirement :
In the vendor master form no matter in which the user is in the create, delete and update actions
should always happen in a particular company

Say there are 5 companies “COMPANY1”, “COMPANY2”, “COMPANY3”, “COMPANY4” and “COMPANY5”

Always edit/delete and create new actions must happen in “COMPANY1”

if the user is in “COMPANY2/COMPANY3/COMPANY4/COMPANY5” and try to perform any of edit/delete or create
action then the form should always switch to “COMPANY1”

public void init()
{
super();
test_ds.crossCompanyAutoQuery(true);
SysQuery::findOrCreateRange(test_DS.query().dataSourceTable(
tablenum(test)), fieldnum(test,dataareaid)).
value(“krch”);

}

Is that the form init ?

yes.