Versions Compared

Key

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

Error 151 occurs when a sync attempt has failed because the record no longer exists on the server. In the log, you will see the message: Sync failed (151) – Record not found.

Typically, this error happens when a record has been deleted from the server, but Pulsar attempted to update that particular record or a related item.

For example, your data may include accounts with client appointments. Your user is offline and creates a client appointment under an account. Meanwhile, someone back at the main office deletes the account. When the user returns online and attempts to sync, the sync fails and returns Error 151is a generic error code for data being queried for and not found.

There are several reasons for this situation:

Table of Contents

Data Missing from the Local Database

Sometimes, the data is not in the local database on the device because it was not synced to Pulsar. Often, this occurs for one of two reasons:

  1. Sync filter configuration - A sync filter may have been set up, and the requested data is not syncing to Pulsar. Check the sync filters in your Pulsar settings and ensure that the desired objects and records are marked for syncing to Pulsar. For more information about data sync filters, refer to Data Sync Settings | Sync Data Filter using a "Where" Clause.

  2. User permissions - The user may not have the permission to view or download the data. Check the user permissions and profile permissions in Salesforce.

Example 1: The record is not in the local database

In this example, Pulsar is attempting to read a table from the Account object and the field AccountId, and it fails. The table isn’t synced, so Pulsar cannot read the field within it.

Code Block
[23-07-05 19:00:23][ERROR][0x173887000] - dbReadTableId (Account, 0010O00001kyhetQAA) failed (151)
[23-07-05 19:00:23][WARN ][0x173887000] - getNextValueForRelationshipChain: relationship object unable to be read `AccountId` (0010O00001kyhetQAA) 151
[23-07-05 19:00:23][ERROR][0x16e287000] - dbReadTableId (Account, 0010O00001kyhetQAA) failed (151)
[23-07-05 19:00:23][WARN ][0x16e287000] - getNextValueForRelationshipChain: relationship object unable to be read `AccountId` (0010O00001kyhetQAA) 151

Example 2: The record does not exist

This example is similar to Example 1. In this case, a custom page (JSAPI) is attempting to access a record via SQL Query. Unfortunately, the record does not exist, and it fails.

Code Block
[23-07-05 19:02:08][ERROR][0x16beaf000] - JSAPI: object read failed
[23-07-05 19:02:08][ERROR][0x16b9c3000] - dbReadTableId (Account, 0010O00001kyhetQAA) failed (151)

Example 3: The metadata is missing

If the metadata did not download to the local database, then you may get Error 151.

In this example, Pulsar is attempting to retrieve some metadata for the Approvals Quick Action, and it fails because the data does not exist on the server.

Code Block
[23-07-06 05:37:24][ERROR][0x16dd5f000] - Failed to retrieve json metadata for quickaction (Approvals, 151) -- skipping

In another example of this situation, the custom page (JSAPI) is trying to retrieve compact layout information, and it fails because the data does not exist on the server.

Code Block
[23-07-06 05:37:32][ERROR][0x16dcd3000] - compactLayoutFieldsForObjectType: failed (151)
[23-07-06 05:37:32][ERROR][0x16dcd3000] - JSAPI: Failed to retrieve compact layout fields. See log for more details.
[23-07-06 05:37:32][ERROR][0x16db2f000] - compactLayoutFieldsForObjectType: failed (151)
[23-07-06 05:37:32][ERROR][0x16db2f000] - JSAPI: Failed to retrieve compact layout fields. See log for more details.

Example 4: Query issues

Sometimes a query attempts to fetch items like icons and images, and they do not exist in the local database.

Code Block
[ 0] Debug message in getLocalProperty: failed to get requested local property (slds.iconTypeString.Opportunity,151)
[23-07-10 15:31:41][ERROR][0x16bb2b000] - JSAPI: getLocalProperty: Error history:
[ 0] Debug message in getLocalProperty: failed to get requested local property (slds.iconTypeString.Case,151)

In other cases, a query with incorrect parameters will cause Error 151. In this example, the query has an “undefined” parameter.

Code Block
[23-06-26 20:27:14][INFO ][0x16c03f000] - showAlert: requesting alert [Database error message][dbReadTableId (FSLABB_Response__c, undefined) failed (151)]
[23-06-26 20:27:14][INFO ][0x16bf27000] - ----- END call stack -----
[23-06-26 20:27:14][INFO ][0x16bfb3000] - showAlert: requesting alert [Database error message][dbReadTableId (FSLABB_Response__c, undefined) failed (151)]

Initial Sync

During an initial sync, Pulsar attempts to find out the previous license status, but since it is the first sync attempt, there is no previous status to find.

Code Block
[23-07-10 15:28:02][INFO ][0x16bb2b000] - LICENSE: Previous license status not found (151)
[23-07-10 15:28:02][INFO ][0x16bb2b000] - LICENSE: Previous license level not found (151)

The next sync (catch-up sync) will fetch the previous license status, and this error will go away.