Hi everyone,

I ran into the same issue when trying to deploy a dashboard containing a text widget:

Error: Problem deserializing ‘setterless’ property ‘richTextContent’: get method returned null…

and also errors like:

  • Property 'dashboardComponentContents' not valid in version 57.0
  • Property 'owner' not valid in version 57.0

Here’s what’s actually going on and how to fix it.

🔎 Root Cause

There are two overlapping problems:

1. Incomplete metadata for text widgets

When you retrieve dashboards (especially StandardDashboards / CRM Analytics dashboards), the Metadata API:

  • does NOT always include full widget content
  • may omit fields like richTextContent

During deployment, Salesforce expects those fields → finds null → throws the deserialization error.


2. API Version mismatch

Errors like:

Property 'dashboardComponentContents' not valid in version 57.0

mean that:

  • your retrieved metadata contains newer fields
  • but your project is deploying using an older API version (e.g. 57.0)

✅ Working Solution

Step 1 — Use SFDX CLI (recommended)

Retrieve and deploy using CLI:

sf project retrieve start --manifest manifest/package.xml --target-org <sourceOrg>
sf project deploy start --manifest manifest/package.xml --target-org <targetOrg>

Step 2 — Align API Versions (CRITICAL)

Make sure ALL of these use the same (recent) version, e.g. 60.0+

manifest/package.xml

<version>60.0</version>

sfdx-project.json

{
  "sourceApiVersion": "60.0"
}

Step 3 — Force API version in deploy (if needed)

If you still see version 57.0 errors:

sf project deploy start \
  --manifest manifest/package.xml \
  --target-org <targetOrg> \
  --api-version 60.0

⚠️ Important Limitation

For dashboards under:

StandardDashboards/...

be aware:

  • They are part of CRM Analytics (Einstein Analytics)
  • Metadata API support is incomplete
  • Some properties (like richTextContent) may not be retrievable

🛠️ Workarounds for richTextContent Error

If the error persists:

Option 1 — Edit the text widget

  • Open dashboard in source org
  • Modify the text widget (add/remove text)
  • Save and retrieve again

Option 2 — Remove text widgets before deploy

  • Remove text widget
  • Deploy dashboard
  • Recreate widget manually in target org

Option 3 — Avoid Metadata API for these dashboards

Use:

  • manual recreation
  • or Analytics-native export/import (if allowed)

🎯 Summary

  • ✔ Use SFDX CLI with package.xml
  • ✔ Set API version to 60.0+ everywhere
  • ✔ Force API version if needed
  • ⚠ CRM Analytics dashboards are not fully deployable via Metadata API
  • ⚠ Text widgets (richTextContent) are a known weak point

Hope this helps anyone running into the same issue 👍