Common Operations
Query
-
The connector has a hard-coded list of default fields it will return.
Searching
CCH Axcess allows searching using the Filters
filter. When using the connector you can pass this filter using the row filter {Filters: [array_of_filters_here]}
.
Example:
// Picking up records that were modified after a certain time
/** @type Parameters<API.connections.cchaxcess.Connection["queryOne"]["Client"]>[0]["rowFilter"] */
const rowFilter = {
Filters: [
{
Field: "1534",
Operator: "1",
Value: "2024-04-10",
AndOr: "0"
}
],
};
for await (const client of this.cchaxcess.query.Client({ rowFilter })) {
}
-
Possible values of
Field
option:-
ClientGUID=1505, ClientTypeCode=1509, ClientID=1514, ClientSortName=1515, LastUpdatedDtTm= 1534, EmailAddress=1612, OfficeGuid=1700, BusinessUnitGuid=1701, ClientResponsibleStaffGuid=1702, CRSPositionGuid=1703, ReturnGroupGuid=1704, ClientStatusCd=1705
-
-
Possible values of
Operator
option:-
Equals=0, Greater Than=1, Less Than=2, Like=3, IN=4
-
-
Possible values of
Value
option:-
When
Field: "ClientTypeCode"
: Corporation=CR, Employee Plan=EP, Fiduciary=FD, Individual=IN, Exempt Organization=EX, Partnership=PR, Sole Proprietorship=SP, Other (Custom)=OT -
When
Field: "ClientStatusCode"
: Active=AC, Inactive=IA, OnHold=OH, LitigationHold=PL, Terminated=TR.
-
-
Possible values of
AndOr
option: AND=0, OR=1.
Ordering
CCH Axcess allows ordering by a specific field usingSortParamAndOrder
parameter. When using the connector you can pass this filter using the row filter.
-
Example:
{SortParamAndOrder: { Order: "1", SortParamArray: ["0", "1"] }}
-
Possible values of
Order
option:-
Ascending=0
-
Descending=1
-
-
Possible values of
SortParamArray
option:-
ClientID=0
-
ClientSortName=1
-
Getting additional fields
-
CCH Axcess doesn’t return all field values in the
Client's
list response. When using the connector you can passextraFields
property filter to get additional fields.-
Example:
{ extraFields: ["additionalFields", "AddressList"] }
-
Attention: When you pass the
extraFields
property filter, the connector will make one request for each filter value to each record.
-
Possible values of extraFields
property filter:
Value |
Extra request to |
Description |
---|---|---|
|
|
Connector returns Client object with additional fields |
|
|
Connector returns Client object with list of addresses |
|
|
Connector returns Client object with list of emails |
|
|
Connector returns Client object with list of instant messenger |
|
|
Connector returns Client object with list of phones |
|
|
Connector returns Client object with list of responsible staffs |
|
|
Connector returns Client object with list of assigned Client Contacts |
|
|
Connector returns Client object with list of assigned Client Contacts with additional fields |
Examples
const cchaxcess = await ctx.connections.cchaxcess();
// EXAMPLE: query client by ClientID with all possible extraFields
/** @type Parameters<API.connections.cchaxcess.Connection["queryOne"]["Client"]>[0]["rowFilter"] */
const queryOneRowFilter = {
Filters: [
{
Field: "1514",
Operator: "0",
Value: "331788589,
AndOr: "0"
}
],
SortParamAndOrder: { Order: "1", SortParamArray: ["0", "1"] }
};
const extraFields = ["additionalFields", "AddressList", "EmailList", "InstantMessengerList", "PhoneList", "responsibleStaffs", "clientContactList", "clientContactListAdditionalFields",];
let clientById = await cchaxcess.queryOne.Client({ rowFilter: queryOneRowFilter, propertyFilter: { extraFields: extraFields, } });
// EXAMPLE: Picking up records that were modified after a certain time
/** @type Parameters<API.connections.cchaxcess.Connection["queryOne"]["Client"]>[0]["rowFilter"] */
const rowFilter = {
Filters: [
{
Field: "1534",
Operator: "1",
Value: "2024-04-10",
AndOr: "0"
}
],
SortParamAndOrder: { SortParamArray: ["0"], Order: "0" },
};
for await (const client of cchaxcess.query.Client({ rowFilter, limit: 5, propertyFilter: { extraFields: ["additionalFields"] } })) {
}