Filter sets help you narrow your focus when creating previews for contract invoice runs.


Get Contract Invoice Filter Set Object Definition

lookup

List all the fields and relationships for the contract invoice filter set object:

<lookup>
    <object>GENINVOICEFILTERS</object>
</lookup>

Parameters

Name Required Type Description
object Required string Use GENINVOICEFILTERS
docparid Optional string Used to indicate the document type, such as Inventory Transfer, Sales Order, Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type.

List Contract Invoice Filter Sets

query

List the record number and dynamic ‘as of date’ for each contract invoice filter set:

<query>
    <object>GENINVOICEFILTERS</object>
    <select>
        <field>RECORDNO</field>
        <field>SETASOFDATE</field>
    </select>
</query>

Parameters

Name Required Type Description
object Required string Use GENINVOICEFILTERS
select Required sequence One or more field names and an optional aggregate function such as count or sum. Returning all fields is not supported.
filter Optional object Query filter expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL).
orderby Optional object Provide an order element with a field name and choose an ascending or descending sort order, for example:
<order>
        <field>RECORDNO</field>
        <descending/>
</order>
options Optional object Set the caseinsensitive element to true for a case-insensitive query:
    <caseinsensitive>true</caseinsensitive>
In a multi-entity company, set the showprivate element to true to query data in private entities:
   <showprivate>true</showprivate>
pagesize Optional integer Custom page size between 1 and 2000 items (Default: 100)
offset Optional integer Point at which to start indexing into records (Default: 0)
docparid Optional string Used to indicate the document type, such as Inventory Transfer, Sales Order, Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type.

List Contract Invoice Filter Sets (Legacy)

<readByQuery>
    <object>GENINVOICEFILTERS</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
</readByQuery>

ReadByQuery

Name Required Type Description
object Required string Use GENINVOICEFILTERS
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. The following operators are supported: <, >, >=, <=, =, like, not like, in, not in, IS NOT NULL, IS NULL, AND, OR. Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli'). Joins are not supported.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)
docparid Optional string Used to indicate the document type, such as Inventory Transfer, Sales Order, Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type.

Get Contract Invoice Filter Set

read

<read>
    <object>GENINVOICEFILTERS</object>
    <keys>1</keys>
    <fields>*</fields>
</read>

Parameters

Name Required Type Description
object Required string Use GENINVOICEFILTERS
keys Required string RECORDNO of the contract invoice filter set to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
docparid Optional string Used to indicate the document type, such as Inventory Transfer, Sales Order, Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type.

Create Contract Invoice Filter Set

Release Changes
2020 Release 4 Added CUSTOMER as a value for INVOICEBY
2019 Release 4 Added INVOICEBY

create

Creates a filter set for the given contract:

<create>
    <GENINVOICEFILTERS>
        <NAME>My filter</NAME>
        <CONTRACTID>CTRC-003</CONTRACTID>
        <INCLUDECONTRACTS>true</INCLUDECONTRACTS>
        <INCLUDECONTRACTUSAGE>true</INCLUDECONTRACTUSAGE>
    </GENINVOICEFILTERS>
</create>

Creates a filter set for the same contract but requests a separate invoice for each project associated with the contract:

<create>
    <GENINVOICEFILTERS>
        <NAME>My filter per project</NAME>
        <CONTRACTID>CTRC-003</CONTRACTID>
        <INVOICEBY>CONTRACT#~#PROJECT</INVOICEBY>
        <INCLUDECONTRACTS>true</INCLUDECONTRACTS>
        <INCLUDECONTRACTUSAGE>true</INCLUDECONTRACTUSAGE>
    </GENINVOICEFILTERS>
</create>

Parameters

Name Required Type Description
GENINVOICEFILTERS Required string Object to create

GENINVOICEFILTERS

Name Required Type Description
NAME Required string Name for the filter set
DESCRIPTION Optional string Description
SETASOFDATE Optional string Dynamic As of date based on current date. Use Today, Yesterday, End of this week, End of last week, Beginning of this month, End of this month, or End of last month. (Default: today’s date)
DOCPARID Optional string Transaction definition to use. Definition must be enabled for Contracts.
CONTRACTID Optional string Contract ID
CONTRACTGROUPID Optional string Contract group ID
INVOICEBY Optional string Specifies how the filter organizes the invoices. Use CONTRACT to generate one invoice per contract, use CONTRACT#~#PROJECT (or PROJECT#~#CONTRACT) to generate a separate invoice for each project associated with the contract, or use CUSTOMER to generate one invoice for each customer. (Default: CONTRACT)
CURRENCY Optional currency Currency code
PROJECTID Optional string Project ID
PROJECTTYPEID Optional string Project type ID
PROJECTMANAGERID Optional string Project manager ID
EMPLOYEEID Optional string Employee ID
CUSTOMERID Optional string Customer ID
CUSTOMERTYPEID Optional string Customer type ID
ITEMID Optional string Item ID
ITEMGROUPID Optional string Item group ID
DEPARTMENTID Optional string Department ID
LOCATIONID Optional string Location ID
STATUS Optional string Status for the filter set itself. Use active for an Active filter set or inactive for an Inactive filter set (Default: Active). An inactive filter set cannot be used to generate invoice previews until it is reactivated.
INCLUDECONTRACTS Optional Boolean Use true to include Contract transactions. (Default: false)
INCLUDECONTRACTUSAGE Optional Boolean Use true to include Contract usage transactions. (Default: false)

Update Contract Invoice Filter Set

Release Changes
2020 Release 4 Added CUSTOMER as a value for INVOICEBY
2019 Release 4 Added INVOICEBY

update

<update>
    <GENINVOICEFILTERS>
        <RECORDNO>1</RECORDNO>
        <CONTRACTID>CTRC-003</CONTRACTID>
        <INCLUDECONTRACTS>true</INCLUDECONTRACTS>
    </GENINVOICEFILTERS>
</update>

Parameters

Name Required Type Description
GENINVOICEFILTERS Required string Object to update

GENINVOICEFILTERS

Name Required Type Description
RECORDNO Optional integer Record number of filter set to update. Required if not using NAME.
NAME Optional string Filter set name. Required if not using RECORDNO.
DESCRIPTION Optional string Description
SETASOFDATE Optional string Dynamic As of date based on current date. Use Today, Yesterday, End of this week, End of last week, Beginning of this month, End of this month, or End of last month. (Default: today’s date)
DOCPARID Optional string Transaction definition to use. Definition must be enabled for Contracts.
CONTRACTID Optional string Contract ID
CONTRACTGROUPID Optional string Contract group ID
INVOICEBY Optional string Specifies how the filter organizes the invoices. Use CONTRACT to generate one invoice per contract, use CONTRACT#~#PROJECT (or PROJECT#~#CONTRACT) to generate a separate invoice for each project associated with the contract, or use CUSTOMER to generate one invoice for each customer. (Default: CONTRACT)
CURRENCY Optional currency Currency code
PROJECTID Optional string Project ID
PROJECTTYPEID Optional string Project type ID
PROJECTMANAGERID Optional string Project manager ID
EMPLOYEEID Optional string Employee ID
CUSTOMERID Optional string Customer ID
CUSTOMERTYPEID Optional string Customer type ID
ITEMID Optional string Item ID
ITEMGROUPID Optional string Item group ID
DEPARTMENTID Optional string Department ID
LOCATIONID Optional string Location ID
STATUS Optional string Status for the filter set itself. Use active for an Active filter set or inactive for an Inactive filter set (Default: Active). An inactive filter set cannot be used to generate invoice previews until it is reactivated.
INCLUDECONTRACTS Optional Boolean Use true to include Contract transactions.
INCLUDECONTRACTUSAGE Optional Boolean Use true to include Contract usage transactions.

Delete Contract Invoice Filter Set

delete

<delete>
    <object>GENINVOICEFILTERS</object>
    <keys>1</keys>
</delete>

Parameters

Name Required Type Description
GENINVOICEFILTERS Required string Object to delete

GENINVOICEFILTERS

Name Required Type Description
KEYS Required string RECORDNO for the filter set to delete

Provide feedback