Constructors
Company()
Methods
checkFieldRights(String,String)
Checks if the current user has access to the field.checkTableRights(String)
Checks if the current user has access to this company.findFromDomain(String)
Find and load company object given a domain.getFormattedAddress()
Gets the formatted company address.getValue(String)
Gets a String with the value of a given column.Possible colNames:
- id: Integer, The primary key (auto-incremented)
- primContact: Integer, The ID of the customer who is the primary contact for this company customer.id
- name: String, The name of the company
- note: String, A freetext field for various notes about this company
- phone: String, The company’s phone number
- fax: String, The company’s faxnumber
- adr: String, The company’s address
- priority: Integer, The reference to the default priority for this company. NULL or -1 if not set. ticket_priority.id
- deleted: Bool, A boolean telling if the company is deleted
- language: Integer, The reference to the default customer language for this company. NULL or -1 if not set. cust_lang.id
- ourContact: Integer, The customer’s primary contact ejuser.id
- extTable: Integer, The reference to the external table if this is a cached entry. NULL or -1 if not. ext_table.id
- extKey: String, The primary key for the cached entry in the external datasource.
- extLastCached: DateTime, When the cached entry was last updated.
- domain: String, A display version of the company_domain table for this company.
- x_* The extrafield with the given database field name.
load(Integer)
Load object with values from company with given ID.loadFromAgentAndKey(Integer,String)
Loads a company based on agent ID and external key.Loading might overwriting existing values.
save()
Saves the object and returns its ID.setFormattedAddress(NSLocalizedField[][])
Sets the formatted address for a company.setValue(String,String)
Sets a value in a column of a company.Possible column names
- id: Integer, The primary key (auto-incremented)
- primContact: Integer, The ID of the customer who is the primary contact for this company customer.id
- name: String, The name of the company
- note: String, A freetext field for various notes about this company
- infoText: the same as note (From 7.x)
- phone: String, The company’s phone number
- phone/formattedNumber: String (From 7.x)
- fax/formattedNumber: String (From 7.x)
- fax: String, The company’s faxnumber
- adr: String, The company’s address (From 7.x setting address with adr is no longer supported. Attempting to do so, will result in a GeneralException. Use NetServer instead)
- priority: Integer, The reference to the default priority for this company. NULL or -1 if not set. ticket_priority.id
- deleted: Bool, A boolean telling if the company is deleted
- language: Integer, The reference to the default customer language for this company. NULL or -1 if not set. cust_lang.id
- ourContact: Integer, The customer’s primary contact ejuser.id
- ourSalesContact: Integer, The sales contact for this company. (From 7.x)
- supportAssociateId: String, Set the support associate id. Supports both integer and the username. (From 7.x)
- primContact: Integer, The customer’s primary contact customer.id
- extTable: Integer, The reference to the external table if this is a cached entry. NULL or -1 if not. ext_table.id
- extKey: String, The primary key for the cached entry in the external datasource.
- extLastCached: DateTime, When the cached entry was last updated.
- domain: String, A display version of the company_domain table for this company.
toParser(Parser)
Puts a lot of fields into the input parser.Fields that will be loaded:
- company.id: The ID
- company.name: The name
- company.note: The note
- company.domain: The domain
- company.phone: Phone number
- company.fax: Fax number
- company.adr: The address
- company.ourContact: The ID of the user that is this company’s contact
- company.primaryContact.id: The ID of the customer that is this company’s primary contact
- company.primaryContact.email: The email address of the customer that is this company’s primary contact
- company.extraFieldName: The name of the extrafield, (not x_fieldname)