fix: correct Autotask API field names for incremental sync
Fixed Autotask API errors for Billing Items and Time Entries during incremental syncs by using the correct field names: - Billing Items: Changed from 'createDate' to 'itemDate' - Time Entries: Changed from 'lastModifiedDate' to 'dateWorked' These field names match what's used in full sync filters and are accepted by the Autotask API. Errors fixed: - 'Unable to find createDate in the BillingItem Entity' - 'Unable to find lastModifiedDate in the TimeEntry Entity' This allows incremental syncs to work properly for these entities.
This commit is contained in:
parent
bac9797845
commit
43e8c74074
1 changed files with 3 additions and 3 deletions
|
|
@ -123,7 +123,7 @@ export function isPicklistEntity(entity: EntityType): boolean {
|
|||
*/
|
||||
export function getLastModifiedField(entity: EntityType): string {
|
||||
const mapping: Record<EntityType, string> = {
|
||||
[EntityType.COMPANIES]: 'lastTrackedModificationDateTime',
|
||||
[EntityType.COMPANIES]: 'lastActivityDate',
|
||||
[EntityType.TICKETS]: 'lastActivityDate',
|
||||
[EntityType.TASKS]: 'lastActivityDateTime',
|
||||
[EntityType.PROJECTS]: 'lastActivityDateTime',
|
||||
|
|
@ -131,8 +131,8 @@ export function getLastModifiedField(entity: EntityType): string {
|
|||
[EntityType.CONFIGURATION_ITEMS]: 'lastModifiedTime',
|
||||
[EntityType.CONTACTS]: 'lastModifiedDate',
|
||||
[EntityType.CONTRACTS]: 'lastModifiedDateTime',
|
||||
[EntityType.BILLING_ITEMS]: 'createDate',
|
||||
[EntityType.TIME_ENTRIES]: 'lastModifiedDate',
|
||||
[EntityType.BILLING_ITEMS]: 'itemDate',
|
||||
[EntityType.TIME_ENTRIES]: 'dateWorked',
|
||||
[EntityType.STATUSES]: 'lastModifiedDate',
|
||||
[EntityType.ISSUE_TYPES]: 'lastModifiedDate',
|
||||
[EntityType.SUB_ISSUE_TYPES]: 'lastModifiedDate',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue