1

I've created several Charts in Standard Listviews on Tabs in LEX. So far they work as expected and look like this:

enter image description here

Now logging in as an other user I've noticed that the charts are not available. Only the user who has created them seems to have access to them.

Second thing I noticed that these charts get not deployed (via ANT or eclipse). We have included the relevant Custom Object and the ListViews into the deployments. Can I use any Metadata-Components to bring these Charts from one Org to the other?

1 Answer 1

2

Long story short: it looks like currently, it is not possible (release 55.0)

Explanation: There are two metadata types representing charts:
ListViewChart (https://developer.salesforce.com/docs/atlas.en-us.238.0.object_reference.meta/object_reference/sforce_api_objects_listviewchart.htm) ListViewChartInstance (https://developer.salesforce.com/docs/atlas.en-us.238.0.object_reference.meta/object_reference/sforce_api_objects_listviewchartinstance.htm)

This means that you can actually query your existing Charts and their instances (which are basically relations between ListView and Chart):

ListViewChart example query:

SELECT Id, IsDeleted, SobjectType, DeveloperName, Language, MasterLabel, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, OwnerId, ChartType, GroupingField, AggregateField, AggregateType 
FROM ListViewChart

ListViewChartInstance example query:

SELECT AggregateField, AggregateType, ChartType, DataQuery, DeveloperName, ExternalId, GroupingField, Id, IsDeletable, IsEditable, IsLastViewed, Label, ListViewChartId, ListViewContextId, SourceEntity 
FROM ListViewChartInstance 
WHERE SourceEntity='<YOUR-SOBJECT-NAME>' and ListViewContextID='<YOUR-LISTVIEW-ID>' 

Unfortunately, it looks like this data could not be retrieved using MetadataAPI - I tried to retrieve them via sfdx:

sfdx force:source:retrieve -m ListViewChartInstance
sfdx force:source:retrieve -m ListViewChart

and what I get is:

ERROR running force:source:retrieve:  The specified metadata type is unsupported: [listviewchartinstance]
ERROR running force:source:retrieve:  The specified metadata type is unsupported: [listviewchart]]

I also tried to insert them using AnonymousApex but I get error: "DML operation Insert not allowed on ListViewChart"

I found some idea on ideaexchange but it's not that popular: https://ideas.salesforce.com/s/idea/a0B8W00000GdXjqUAF/list-view-chart-deployment-to-higher-sandboxs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .