deleteField method
Deletes a field from a cases template.
After a field is deleted:
-
You can still retrieve the field by calling
BatchGetField. -
You cannot update a deleted field by calling
UpdateField; it throws aValidationException. -
Deleted fields are not included in the
ListFieldsresponse. -
Calling
CreateCasewith a deleted field throws aValidationExceptiondenoting which field identifiers in the request have been deleted. -
Calling
GetCasewith a deleted field identifier returns the deleted field's value if one exists. -
Calling
UpdateCasewith a deleted field ID throws aValidationExceptionif the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (usingemptyValue: {}) the field's value from the case. -
GetTemplatedoes not return field IDs for deleted fields. -
GetLayoutdoes not return field IDs for deleted fields. -
Calling
SearchCaseswith the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria. -
Calling
SearchCaseswith asearchTermvalue that matches a deleted field's value on a case returns the case in the response. -
Calling
BatchPutFieldOptionswith a deleted field ID throw aValidationException. -
Calling
GetCaseEventConfigurationdoes not return field IDs for deleted fields.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainId :
The unique identifier of the Cases domain.
Parameter fieldId :
Unique identifier of the field.
Implementation
Future<void> deleteField({
required String domainId,
required String fieldId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/domains/${Uri.encodeComponent(domainId)}/fields/${Uri.encodeComponent(fieldId)}',
exceptionFnMap: _exceptionFns,
);
}