IUseCADataverseTaskManagerConfig
@spartanfx/react / codeapps / IUseCADataverseTaskManagerConfig
Interface: IUseCADataverseTaskManagerConfig
Configuration for useCADataverseTaskManager.
Extends
Omit<ICATaskManagerBaseConfig<string>,"fieldMapping">
Properties
| Property | Type | Description | Overrides | Inherited from |
|---|---|---|---|---|
assigneeEntitySet? | string | Plural entity set name for the assignee target entity, used to build the @odata.bind path on create/update. Optional — when omitted, the target table is discovered automatically from the assignee lookup's ManyToOneRelationships metadata (e.g. systemuser → systemusers). Set this only to override that discovery, e.g. when the lookup points at a custom table with an irregular plural entity-set name. | - | - |
assigneeService? | unknown | Generated service for the assignee lookup's target table (the table the lookup points at — e.g. SystemusersService). When provided, the built-in people-picker reads candidate rows from it with getAll, using the table's primary name/id columns. This is the Microsoft-sanctioned way to read a Dataverse lookup's possible values: the related table must be added as a data source (pac code add-data-source -a dataverse -t systemuser), which generates the service you pass here. The service's table is verified against the lookup's actual target (from metadata) before use — a mismatch is logged and ignored so a row id from the wrong table can never be bound. Omit it to rely on onGetUserSuggestions (full control) or the built-in fallback that suggests assignees already present in the loaded tasks. Example import { SystemusersService } from './generated/services/SystemusersService'; useCADataverseTaskManager({ service: Ps_tasksService as never, assigneeService: SystemusersService, idColumn: 'ps_taskid', fieldMapping: { …, assignedTo: 'ps_assignedto' }, }); | - | - |
autoRefresh? | boolean | Enable auto-refresh after mutations (default: true). | - | Omit.autoRefresh |
buckets? | string[] | Static list of status buckets. Provide this when the data source has no introspection capability (Dataverse choice metadata is not available at runtime via generated services). | - | Omit.buckets |
cacheDuration? | number | Cache TTL for read results in ms (default: 60_000). | - | Omit.cacheDuration |
debug? | boolean | Enable verbose console logging (default: false). | - | Omit.debug |
fieldMapping | ITaskFieldMapping | Field mapping from internal task fields to Dataverse column logical names. There are no defaults for Dataverse because the publisher prefix (e.g. cr1a3_) is consumer-specific. Example fieldMapping: { title: 'cr1a3_title', description: 'cr1a3_description', dueDate: 'cr1a3_duedate', assignedTo: 'cr1a3_assignedto', // lookup column logical name status: 'cr1a3_status', // choice column } | - | - |
idColumn | string | Logical name of the primary key column on the task table. Typically <entity>id, e.g. cr1a3_taskid. | - | - |
odataFilter? | string | OData $filter expression applied to getAll. Empty string or undefined means no filter. | - | Omit.odataFilter |
onError? | (error) => void | Error callback. Called for every operational failure. | - | Omit.onError |
onGetUserSuggestions? | (searchText) => Promise<IUserSuggestion[]> | Optional advanced people-picker override. Managed adapters provide a backend-native default when the generated service exposes enough user lookup information. | - | Omit.onGetUserSuggestions |
onNotify? | CANotifyFn | Notification callback. If omitted, hook errors surface via error state only. | - | Omit.onNotify |
orderColumn? | string | Column used for $orderby on getAll. Optional — when omitted, the connector returns server-default order. | Omit.orderColumn | - |
resolveAssignee? | (loginName) => Promise<string> | Optional resolver mapping a login name / UPN / email to the Dataverse primary key (GUID) of the corresponding row in the assignee table. Example resolveAssignee: async (upn) => { const result = await SystemUsersService.getAll({ filter: internalemailaddress eq '${upn.replace(/'/g, "''")}', select: ['systemuserid'], top: 1, }); return result.data?.[0]?.systemuserid; } | - | - |
retryPolicy? | ICARetryPolicy | Retry policy for transient failures. | - | Omit.retryPolicy |
rowLimit? | number | Maximum records per fetch (default: 5000). | - | Omit.rowLimit |
service | ICATabularService<CATaskRecord, string> | Generated tabular service from pac code add-data-source. | - | Omit.service |