Function: updateSoilAnalysis()
updateSoilAnalysis(
fdm
,principal_id
,a_id
,soilAnalysisData
):Promise
<void
>
Defined in: fdm-core/src/soil.ts:104
Updates an existing soil analysis record and the related soil sampling timestamp.
This function first verifies whether the principal has write permission for the specified soil analysis record. It then executes a transaction to update the soil analysis entry with the provided changes and refreshes the corresponding soil sampling record's update timestamp.
Parameters
fdm
any
The FDM instance providing the connection to the database. The instance can be created with createFdmServer.
principal_id
any
Identifier of the principal performing the update.
a_id
any
The unique identifier of the soil analysis record to update.
soilAnalysisData
any
Object containing the fields to update; supports partial updates.
Returns
Promise
<void
>
Throws
If the database transaction fails or the permission check does not pass.