Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Sometimes a user’s device has a system time which is out of sync with the server time. When this happens, the user will have an error in the log during a create request, such as while syncing a service reportThe user sees “Created Date in the future” error when syncing any offline created record back to Salesforce.

Example

The error will look something like this:

Code Block
doSoapRequest: create
.
.
.
Error(ERROR TYPE) field (FieldName) description (Create Date(Date) in the future.: Created Date)
----- doCreate response -----

...

Reason

This support ticket response explains why this happens:

...

Solution

The solution to this issue is to disable settings on the server and make sure the user’s device time is set automatically.

Salesforce Server Settings Changes

Disable First, the user should try to sync the device time with the server time and then try to generate the Service report again. Follow these steps to sync the device time:

  1. Go into Settings > Time & language > Date & time.

  2. Ensure the toggle for Set time zone automatically is set to On.

  3. Ensure the toggle for Set time automatically is set to On.

  4. Under Additional settings, click the Sync Now button to sync the time settings for the server: time.windows.com.

...

If that does not work, or the user does not have the option to sync the device time, Salesforce support provides a workaround to solve this issue. The workaround requires disabling the “Set Audit Fields upon Record Creation and Update Records with Inactive Owner’s” User Permissions by performing the following steps.

...

Follow these steps to perform the workaround:

  1. Log into your Salesforce org as an administrator.

  2. Navigate to Setup.

  3. Navigate to User Interface.

  4. Uncheck the box next to Enable “Set Audit Fields upon Record Creation and Update Records with Inactive Owner’s” User Permissions.

  5. Click the Save button.

...

User Device Settings Changes

Ensure the time zone and the time are set automatically and then synced by instructing the user to perform the following steps:

  1. Go into Settings > Time & language > Date & time.

  2. Ensure the toggle for Set time zone automatically is set to On.

  3. Ensure the toggle for Set time automatically is set to On.

  4. Under Additional settings, click the Sync Now button to sync the time settings for the server: time.windows.com.

...