FSM Case Unbilled Amount Processing
Field Service Management (FSM) updates the saved time, expense, and sales order amounts on a case through background processing. For the calculations and their limits, see FSM Case Unbilled Amount Calculation.
Update Requests
The Update Unbilled box (custevent_nx_unbilled_update) on the case requests a recalculation. Checking it does not immediately replace or clear the saved amounts, and does not show that a script is currently running.
Under the standard FSM record handling, creating, changing, or deleting the following records requests an update.
|
Changed Record |
Case for Update Request |
|---|---|
|
Sales order, expense report, or invoice |
The case currently linked on that record. For deletion, FSM uses the deleted record's case link. |
|
Time bill |
The case linked to the time bill's current task. For deletion, FSM uses the deleted time bill's task link. |
Submitting a case with Update Unbilled checked also schedules unbilled processing. Saving a source record can succeed even if the separate request to update its case fails. The saved amounts can therefore remain unchanged after a save or when an update is awaiting processing.
Background Selection and Completion
The background process selects cases with a Field Service Case Type and Update Unbilled checked. It excludes a case if an active, unrecovered field service error record matches all of these values:
-
The Unbilled deployment (
customdeploy_nx_unbilled) -
Record type
supportcase -
The case's internal ID
An error for another deployment or record type does not meet this exclusion.
For each selected case, FSM recalculates and writes the three category amounts. A successful write also clears Update Unbilled. Until that write succeeds, the previously saved amounts can remain on the case. A cleared Update Unbilled box alone does not establish that the amounts reflect the latest source data.
The standard case processing banner can include Recalculate Unbilled Amounts when the case is eligible for this processing. This message indicates outstanding work. It does not establish that the Unbilled execution is running. A case excluded by a matching error can retain Update Unbilled without this pending message.
The following table describes the scripts involved in this feature.
|
Script |
Role in This Feature |
|---|---|
|
Field Service User Event ( |
Handles the record changes that request updates and supplies the case processing banner. |
|
Field Service Scheduled ( |
Selects eligible cases and saves the recalculated amounts. |
For shared execution monitoring and deployment behavior, see FSM Script Reference. For error data and state definitions, see Field Service Error Record.