
If you want to change the company during the code (i.e. in a Runnable class or a job) you can use changeCompany(‘xxx’) command like shown in this example :
public static void main(Args _args)
{
SalesLine salesLine;
changeCompany('USMF') //Default company is now 'USMF'.
{
while select salesLine
where salesLine.SalesId == 'XXX-002011'
{
// do something....
}
}