Skip to main content

Function: getFertilizerApplications()

getFertilizerApplications(fdm, principal_id, b_id, timeframe?): Promise<getFertilizerApplicationType[]>

Defined in: fdm-core/src/fertilizer.ts:846

Retrieves fertilizer application records for a specific field.

This function first ensures that the requesting principal has read permission for the specified field, then queries the database for fertilizer application records associated with that field. The returned records are ordered by application date in descending order.

Parameters

fdm

any

The FDM instance providing the connection to the database. The instance can be created with createFdmServer.

principal_id

any

The identifier of the principal making the request.

b_id

any

The identifier of the field.

timeframe?

Timeframe

Optional timeframe to filter the fertilizer applications.

Returns

Promise<getFertilizerApplicationType[]>

A promise that resolves with an array of fertilizer application records.

Throws

If permission is denied or if an error occurs during record retrieval.