removeField
@svenvw/fdm-source / fdm-core/src / removeField
Function: removeField()
removeField(
fdm
,principal_id
,b_id
):Promise
<void
>
Defined in: fdm-core/src/field.ts:459
Alpha
Removes a field and all its associated data.
This function checks if the principal has permission to delete the field, then proceeds to delete the field and all cascading data, including acquiring and discarding information, cultivations, fertilizer applications, soil analyses, and harvests.
Parameters
fdm
any
The FDM instance providing the connection to the database. The instance can be created with createFdmServer.
principal_id
any
The unique identifier of the principal performing the operation.
b_id
any
The unique identifier of the field to be removed.
Returns
Promise
<void
>
A promise that resolves when the field has been successfully removed.
Throws
If the principal does not have permission to delete the field.