Download PDF
Download page Company Service.
Company Service
NovatusCompany Object
- The NovatusCompany class mirrors what is seen on the Company Profile of the Contracts application.
- When creating a Company, the name, group, and status are required; thus failing to set these with the company.setName (as an example) will lead to an error.
- Furthermore, when inserting string values for dropdown menus, such as company status, the string must be an exact match for the dropdown menu value.
public List<NovatusListComboItem> getListAdminByName(String group) {
List<NovatusListComboItem> listAdmins = session.getListAdminPort().getList(group);
return listAdmins;
}
public NovatusCompany addCompany(String name, String group, String status) {
NovatusCompany company = new NovatusCompany();
company.setName(name);
company.setGroup(group);
company.setStatus(status);
As you can see in the above example to facilitate the process the three required fields are defined in the function which are defined in the main method. Above that call the list admin service (described in more detail later in this document) to create a check for the group field. A similar method can also be used to print that data to the screen so that users will have an easier time knowing what groups are available.
Production WSDL: https://app1.novatuscontracts.com/Contracts/wsapi/v1/Company?Wsdl
Field Name | Type | Description | Required | |
id | String | A unique identifier for the company | Yes | - |
name | String | Company Name | Yes | Yes |
number | String | Company Number | Yes | - |
group | String | Company Group | Yes | Yes |
taxId | String | Company Tax ID | Yes | - |
status | String | Company Status | Yes | Yes |
dunsNumber | String | DUNS number | Yes | - |
type | String | Company Type | Yes | - |
category | String | Company Category | Yes | - |
url | String | Company URL | Yes | - |
address1 | String | Primary Address Line | Yes | - |
address2 | String | Primary Address Line 2 | Yes | - |
city | String | Primary Address City | - | - |
state | String | Primary Address State | Yes | - |
postalCode | String | Primary Address ZIP Code | Yes | - |
country | String | Primary Address Country | Yes | - |
phoneAreaCode | String | Phone Area Code | - | - |
phoneCountryCode | String | Phone Country Code | - | - |
phoneExtension | String | Phone Extension | - | - |
phoneNumber | String | Phone Number | - | - |
faxAreaCode | String | Fax Area Code | - | - |
faxCountryCode | String | Fax Country Code | - | - |
faxExtension | String | Fax Extension | - | - |
faxNumber | String | Fax Number | - | - |
description | String | Company Description | Yes | - |
dynamics | Map<String, Object> | A map of dynamic object type ID's to their values | - | - |
NovatusCompany Object Methods
The methods listed below are the means by which changes can be made to the company itself; below is a quick example of how to use these methods.
String companyId = session.getCompanyPort().create(company);
CompanyQueryResult test = session.getCompanyPort().query("id = '" + companyId + "'", 10, 0);
//CompanyQueryResult company = companyPort.query("name='Example Company'", 25, 0);
return test.getCompanyList().get(0);
NovatusCompany NSQL Methods
These are list of items that can be placed into an NQL statement to filter Company queries. This is different from the above chart in that these are not methods that can return data but rather NQL statements that can allow you to filter query results.
Filter Name | Description |
id | A unique identifier for the company |
name | Company Name |
number | Company Number |
group | Company Group |
taxid | Company Tax ID |
status | Company Status |
duns | DUNS number |
type | Company Type |
category | Company Category |
url | Company URL |
address1 | Primary Address Line 1 |
address2 | Primary Address Line 2 |
city | Primary Address City |
state | Primary Address State |
postal | Primary Address ZIP Code |
country | Primary Address Country |
description | Company Description |
lastupdatedon | Last date and time the company was updated |