> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Working with companies in CRMScript

> How to work with companies in CRMScript.

## Company (class)

The [Company CRMScript class][1] represents the following entities:

* Real-life: a company or organization
* SuperOffice UI: company
* Database table: [contact][4]

The **company** database table is unrelated to the **Company** CRMScript class. The table should have one row only, containing information about licenses and the owner of the SuperOffice database.

<Danger>
  Changing the `company` table will make it **impossible to sign in** for all users. The only fix is to restore the database from backup.
</Danger>

## Parser variables

Calling `toParser()` will load the following fields and make them available to [templates][2]:

* company.id
* company.name
* company.note
* company.domain
* company.phone
* company.fax
* company.adr
* company.ourContact
* company.primaryContact.id
* company.primaryContact.email

See the [connected persons][5] table for a description of `ourContact` and `primaryContact`.

```crmscript! theme={null}
Parser p;
Company c;
c.load(2);
c.toParser(p);
printLine(p.getVariable("company.name", 0));
```

<Tip>
  Read more about [localized addresses][3].
</Tip>

## How-to

* [Create company][6]
* [Get company][7]
* [Get activities][8]

[1]: /en/automation/crmscript/reference/CRMScript.Native.Company

[2]: ../request/reply-templates

[3]: ../../../../api/localization/address/index

[4]: ../../../../database/tables/contact

[5]: ./create-company#connected-persons

[6]: ./create-company

[7]: ./get-company

[8]: ./get-activities


## Related topics

- [Working with NS classes in CRMScript](/en/automation/crmscript/netserver/ns-classes.md)
- [Create and update companies](/en/automation/crmscript/howto/company/create-company.md)
- [Get company info](/en/automation/crmscript/howto/company/get-company.md)
- [Working with companies in API](/en/company/dev/index.md)
- [Companies](/en/mobile/company/index.md)
- [Set/clear interest on company](/en/automation/crmscript/howto/interests/company-interests.md)
- [Interests](/en/automation/crmscript/howto/interests/index.md)
