• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

Working with companies in CRMScript

•
Version: 10
Some tooltip text!
• 1 minute to read
 • 1 minute to read

Company (class)

The Company CRMScript class represents the following entities:

  • Real-life: a company or organization
  • SuperOffice UI: company
  • Database table: contact

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.

Warning

Changing the company table will make it impossible to sign in for all users. The only fix is to restore the database from backup.

Parser variables

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

  • 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 table for a description of ourContact and primaryContact.

Parser p;
Company c;
c.load(2);
c.toParser(p);
printLine(p.getVariable("company.name", 0));
Tip

Read more about localized addresses.

How-to

  • Create company
  • Get company
  • Get activities
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top