FSM CRM Task Date and Time Synchronization
Field Service Management (FSM) converts CRM task schedule values between the record's service time zone and the current NetSuite session time zone. For the time zone contexts and background restoration lifecycle, see FSM Service Time Zone Sourcing and Synchronization.
CRM Task Synchronization in Two Directions
CRM task conversion operates when the task has a service time zone and either a Task Type (custevent_nx_task_type) or an asset. It synchronizes the four Field Service date and time fields listed in FSM Service Time Zone and Date Fields with native Start Date (startdate), End Date (enddate), Start Time (starttime), and End Time (endtime). Reserve Time (timedevent) controls the native timed schedule.
Native values to Field Service values. On the NetSuite form, changing the native Start Date, Start Time, End Time, or Reserve Time derives Field Service values in the task's time zone. If both resulting Field Service clock times are populated, Start Time must be earlier than End Time. An equal or later Start Time blocks saving with Start time must be before end time. Server-side submission also enforces this ordering when conversion runs.
Field Service values to native values. Changing Field Service values derives the native representation in the current session's time zone. At save time, a populated Field Service Start Date makes the Field Service values the conversion input. When that date is empty, the native values are the input. A valid Field Service interval can convert to native clock times whose start is equal to or later than the end. The expected behavior is to clear Reserve Time, allow NetSuite to clear the native time values, and successfully save the Field Service schedule. Eligible saved tasks are then selected for background native-time restoration, as described in Processing Model and Lifecycle.
For a non-UI submission with a populated Field Service Start Date, FSM derives native values from the Field Service values. Changing only the native times in that submission does not make those native times the conversion input and can result in those changes being replaced.
When conversion needs a start date and none is supplied, it uses the current date in the input's time zone. When Field Service values are the conversion input, FSM sets Field Service End Date to Field Service Start Date. Native-to-Field Service conversion begins with one native date. The conversion treats an equal or earlier native end clock as the following day. The resulting Field Service clocks still have to pass the ordering rule.
A later Field Service End Date does not bypass that rule. For example, Field Service times of 23:00 to 01:00 are rejected when both are populated, even if separate date fields suggest an overnight interval. This is different from valid Field Service times that cross midnight only after conversion to the user's time zone.
When FSM Clears Reserve Time
Reserve Time can be cleared when the converted native clock times do not meet the required order in the current NetSuite session. This can occur even when the task's Field Service times are valid and the full converted dates and times are chronologically correct. FSM compares the converted native clock times. A later end date does not make a native start clock of 13:00 earlier than an end clock of 02:30. A difference between time zones does not trigger this clearing when the converted native clocks remain in increasing order.
The following table compares a Field Service schedule with its equivalent native schedule. The session time zone is three hours ahead on the service date.
|
Representation |
Start |
End |
|---|---|---|
|
Field Service schedule |
11 October, 10:00 |
11 October, 23:30 |
|
Equivalent native schedule in the session time zone |
11 October, 13:00 |
12 October, 02:30 |
The work still ends after it starts. However, the native clock comparison sees 13:00 followed by 02:30. FSM therefore clears Reserve Time instead of discarding the valid Field Service schedule. Rollover can also occur in the other direction. With a session three hours behind, Field Service times of 01:00 to 04:00 on one date cross a session-date boundary. The native start is 22:00 on the previous date, and the native end is 01:00 on the service date.
The following table describes situations that can produce the same conversion condition.
|
Situation |
Clearing Condition |
|---|---|
|
Entering or changing Field Service dates or times |
The new local schedule converts to a native interval that crosses a session-date boundary. |
|
Changing the task's Field Service Time Zone |
With existing Field Service values, the new time zone changes their native representation. A source-relationship change can also trigger this when it sources the task's time zone again. |
|
Adding or changing Task Type or Asset |
These selections can trigger conversion, and adding either can make a task eligible for form conversion. With Field Service values present, the same native clock-order condition applies. |
|
Saving an existing task from a different NetSuite session time zone |
Save-time conversion uses the populated Field Service Start Date and current session context, even if the user changed another field rather than the schedule. |
|
A scripted or integration submission that runs the same conversion |
With Field Service Start Date populated, conversion derives native values in the submitting session's time zone. Other NetSuite submission validation can still apply. |
Native input remains a separate case. Editing native times derives Field Service values. When both native clocks are populated and native Start Time is equal to or later than End Time, that conversion can also clear Reserve Time. It treats the native end as the following day when deriving the Field Service values. If the resulting Field Service Start Time is equal to or later than Field Service End Time, saving is rejected. If the derived Field Service times are valid, later save-time conversion can still encounter the native representation condition described in this section and use the expected save-and-restoration path. Clearing Reserve Time does not permit an invalid Field Service time range to be saved.
A cleared Reserve Time box alone does not prove that this condition occurred or that a task is awaiting restoration. Native timed scheduling also depends on populated time values, and the background selection checks the saved fields described in Processing Model and Lifecycle.