Function: addFertilizerApplication()
addFertilizerApplication(
fdm
,principal_id
,b_id
,p_id
,p_app_amount
,p_app_method
,p_app_date
):Promise
<any
>
Defined in: fdm-core/src/fertilizer.ts:625
Adds a fertilizer application record.
Validates that the specified field and fertilizer exist and that the principal has write permission on the field before inserting the application record.
Parameters
fdm
any
The FDM instance providing the connection to the database. The instance can be created with createFdmServer.
principal_id
any
The ID of the principal performing the operation.
b_id
any
The ID of the field where the fertilizer application is recorded.
p_id
any
The ID of the fertilizer to be applied.
p_app_amount
any
The amount of fertilizer applied.
p_app_method
any
The method used for applying the fertilizer.
p_app_date
any
The date of the fertilizer application.
Returns
Promise
<any
>
A Promise that resolves with the unique ID of the newly created fertilizer application record.
Throws
When the specified field or fertilizer does not exist or if the record insertion fails.