Create and update companies

Void setValue(String column, String value)

Sets a named field to the given value. Look up names in the reference section down below, or check out the class reference.

🛈 Note
Both parameters are strings! Remember to use quotes even for IDs.
Company c;
c.setValue("name", "SuperOffice");
c.save();

Integer save()

Saves a new or updated company and returns its ID.

Company c;
c.setValue("name", "SuperOffice");
c.setValue("domain", "superoffice.com");
printLine(c.save().toString());

Reference

Frequently used values

ParameterDatabase fieldDescription
namenameThe name of the company
phonephoneThe company’s phone number
domaincompany_domainA display-version of the company’s domain
priorityticket_priorityThe ID of the default priority for this company.
NULL or -1 if not set.
languagecust_langThe ID of the default customer language for this company.
NULL or -1 if not set.

Connected persons

ParameterDatabase fieldDescription
ourContactassociate_idThe ID (ejuser.id) of the internal employee handling sale to this company
supportAssociateIdsupportAssociateIdThe ID (ejuser.id) or username of the internal employee handling support to this company
primContactsupportPersonThe ID (customer.id) of the primary contact in this company
the counterpart of supportAssociateId

For a complete list of fields, see the database reference.